org.eclipse.ui.presentations.IStackPresentationSite Java Examples
The following examples show how to use
org.eclipse.ui.presentations.IStackPresentationSite.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PresentationFactory.java From nebula with Eclipse Public License 2.0 | 6 votes |
/** * {@inheritDoc} */ @Override public StackPresentation createStandaloneViewPresentation(Composite parent, IStackPresentationSite site, boolean showTitle) { if (showTitle) { if ("group".equals(site.getProperty("type"))) { return new PGroupStackPresentation(site,parent); } else { return new ExpandBarStandaloneStackPresentation(site,parent); } } else { return new EmptyStandaloneStackPresentation(site,parent); } }
Example #2
Source File: PGroupStackPresentation.java From nebula with Eclipse Public License 2.0 | 5 votes |
/** * {@inheritDoc} */ @Override public void setState(int state) { if (state == IStackPresentationSite.STATE_MINIMIZED) { group.setExpanded(false); } else if(state == IStackPresentationSite.STATE_RESTORED) { group.setExpanded(true); } }
Example #3
Source File: CTabFolderStackPresentation.java From nebula with Eclipse Public License 2.0 | 5 votes |
/** * {@inheritDoc} */ @Override public void setState(int state) { if (state == IStackPresentationSite.STATE_MAXIMIZED) tabFolder.setMaximized(true); if (state == IStackPresentationSite.STATE_RESTORED) { tabFolder.setMaximized(false); tabFolder.setMinimized(false); } if (state == IStackPresentationSite.STATE_MINIMIZED) tabFolder.setMinimized(true); }
Example #4
Source File: PresentationFactory.java From nebula with Eclipse Public License 2.0 | 5 votes |
/** * {@inheritDoc} */ @Override public StackPresentation createViewPresentation(Composite parent, IStackPresentationSite site) { if ("group".equals(site.getProperty("type"))) { return new PGroupStackPresentation(site,parent); } return new PShelfStackPresentation(site,parent); }
Example #5
Source File: ExpandBarStandaloneStackPresentation.java From nebula with Eclipse Public License 2.0 | 5 votes |
/** * {@inheritDoc} */ @Override public void setState(int state) { if (state == IStackPresentationSite.STATE_MINIMIZED) { eBarItem.setExpanded(false); } else if(state == IStackPresentationSite.STATE_RESTORED) { eBarItem.setExpanded(true); } }
Example #6
Source File: StandardEditorSystemMenu.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
/** * Create the standard view menu * * @param site the site to associate the view with */ public StandardEditorSystemMenu(IStackPresentationSite site) { restore = new SystemMenuRestore(site); move = new SystemMenuMove(site, getMoveMenuText(), false); minimize = new SystemMenuMinimize(site); maximize = new SystemMenuMaximize(site); close = new SystemMenuClose(site); closeOthers = new SystemMenuCloseOthers(site); closeAll = new SystemMenuCloseAll(site); { // Initialize system menu menuManager.add(new GroupMarker("misc")); //$NON-NLS-1$ menuManager.add(new GroupMarker("restore")); //$NON-NLS-1$ menuManager.add(new UpdatingActionContributionItem(restore)); menuManager.add(move); menuManager.add(new GroupMarker("size")); //$NON-NLS-1$ menuManager.add(new GroupMarker("state")); //$NON-NLS-1$ menuManager.add(new UpdatingActionContributionItem(minimize)); menuManager.add(new UpdatingActionContributionItem(maximize)); menuManager.add(new Separator("close")); //$NON-NLS-1$ menuManager.add(close); menuManager.add(closeOthers); menuManager.add(closeAll); site.addSystemActions(menuManager); } // End of system menu initialization }
Example #7
Source File: StandardEditorSystemMenu.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
/** * Create the standard view menu * * @param site the site to associate the view with */ public StandardEditorSystemMenu(IStackPresentationSite site) { restore = new SystemMenuRestore(site); move = new SystemMenuMove(site, getMoveMenuText(), false); minimize = new SystemMenuMinimize(site); maximize = new SystemMenuMaximize(site); close = new SystemMenuClose(site); closeOthers = new SystemMenuCloseOthers(site); closeAll = new SystemMenuCloseAll(site); { // Initialize system menu menuManager.add(new GroupMarker("misc")); //$NON-NLS-1$ menuManager.add(new GroupMarker("restore")); //$NON-NLS-1$ menuManager.add(new UpdatingActionContributionItem(restore)); menuManager.add(move); menuManager.add(new GroupMarker("size")); //$NON-NLS-1$ menuManager.add(new GroupMarker("state")); //$NON-NLS-1$ menuManager.add(new UpdatingActionContributionItem(minimize)); menuManager.add(new UpdatingActionContributionItem(maximize)); menuManager.add(new Separator("close")); //$NON-NLS-1$ menuManager.add(close); menuManager.add(closeOthers); menuManager.add(closeAll); site.addSystemActions(menuManager); } // End of system menu initialization }
Example #8
Source File: PresentationFactory.java From nebula with Eclipse Public License 2.0 | 4 votes |
/** * {@inheritDoc} */ @Override public StackPresentation createEditorPresentation(Composite parent, IStackPresentationSite site) { return new CTabFolderStackPresentation(site,parent); }
Example #9
Source File: UnOpenAgainEditorPresentationFactory.java From translationstudio8 with GNU General Public License v2.0 | 4 votes |
public StackPresentation createEditorPresentation(Composite parent, IStackPresentationSite site) { DefaultTabFolder folder = new DefaultTabFolder(parent, editorTabPosition | SWT.BORDER, site .supportsState(IStackPresentationSite.STATE_MINIMIZED), site.supportsState(IStackPresentationSite.STATE_MAXIMIZED)); /* * Set the minimum characters to display, if the preference is something * other than the default. This is mainly intended for RCP applications * or for expert users (i.e., via the plug-in customization file). * * Bug 32789. */ final IPreferenceStore store = PlatformUI.getPreferenceStore(); if (store .contains(IWorkbenchPreferenceConstants.EDITOR_MINIMUM_CHARACTERS)) { final int minimumCharacters = store .getInt(IWorkbenchPreferenceConstants.EDITOR_MINIMUM_CHARACTERS); if (minimumCharacters >= 0) { folder.setMinimumCharacters(minimumCharacters); } } PresentablePartFolder partFolder = new PresentablePartFolder(folder); TabbedStackPresentation result = new TabbedStackPresentation(site, partFolder, new StandardEditorSystemMenu(site)); DefaultThemeListener themeListener = new DefaultThemeListener(folder, result.getTheme()); result.getTheme().addListener(themeListener); new DefaultMultiTabListener(result.getApiPreferences(), IWorkbenchPreferenceConstants.SHOW_MULTIPLE_EDITOR_TABS, folder); new DefaultSimpleTabListener(result.getApiPreferences(), IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS, folder); return result; }
Example #10
Source File: UnOpenAgainEditorPresentationFactory.java From tmxeditor8 with GNU General Public License v2.0 | 4 votes |
public StackPresentation createEditorPresentation(Composite parent, IStackPresentationSite site) { DefaultTabFolder folder = new DefaultTabFolder(parent, editorTabPosition | SWT.BORDER, site .supportsState(IStackPresentationSite.STATE_MINIMIZED), site.supportsState(IStackPresentationSite.STATE_MAXIMIZED)); /* * Set the minimum characters to display, if the preference is something * other than the default. This is mainly intended for RCP applications * or for expert users (i.e., via the plug-in customization file). * * Bug 32789. */ final IPreferenceStore store = PlatformUI.getPreferenceStore(); if (store .contains(IWorkbenchPreferenceConstants.EDITOR_MINIMUM_CHARACTERS)) { final int minimumCharacters = store .getInt(IWorkbenchPreferenceConstants.EDITOR_MINIMUM_CHARACTERS); if (minimumCharacters >= 0) { folder.setMinimumCharacters(minimumCharacters); } } PresentablePartFolder partFolder = new PresentablePartFolder(folder); TabbedStackPresentation result = new TabbedStackPresentation(site, partFolder, new StandardEditorSystemMenu(site)); DefaultThemeListener themeListener = new DefaultThemeListener(folder, result.getTheme()); result.getTheme().addListener(themeListener); new DefaultMultiTabListener(result.getApiPreferences(), IWorkbenchPreferenceConstants.SHOW_MULTIPLE_EDITOR_TABS, folder); new DefaultSimpleTabListener(result.getApiPreferences(), IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS, folder); return result; }
Example #11
Source File: EmptyStandaloneStackPresentation.java From nebula with Eclipse Public License 2.0 | 3 votes |
public EmptyStandaloneStackPresentation(IStackPresentationSite stackSite, Composite parent) { super(stackSite); partParent = parent; borderComposite = new Composite(parent,SWT.BORDER); }