Java Code Examples for org.eclipse.ui.IWorkbenchPreferenceConstants#SHOW_MULTIPLE_EDITOR_TABS
The following examples show how to use
org.eclipse.ui.IWorkbenchPreferenceConstants#SHOW_MULTIPLE_EDITOR_TABS .
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: 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 2
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; }