Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 278064 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java (-1 / +5 lines)
Lines 48-53 Link Here
48
import org.eclipse.ui.IWorkbenchPage;
48
import org.eclipse.ui.IWorkbenchPage;
49
import org.eclipse.ui.IWorkbenchPartConstants;
49
import org.eclipse.ui.IWorkbenchPartConstants;
50
import org.eclipse.ui.IWorkbenchPartReference;
50
import org.eclipse.ui.IWorkbenchPartReference;
51
import org.eclipse.ui.IWorkbenchPreferenceConstants;
51
import org.eclipse.ui.IWorkbenchWindow;
52
import org.eclipse.ui.IWorkbenchWindow;
52
import org.eclipse.ui.PartInitException;
53
import org.eclipse.ui.PartInitException;
53
import org.eclipse.ui.PerspectiveAdapter;
54
import org.eclipse.ui.PerspectiveAdapter;
Lines 65-70 Link Here
65
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
66
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
66
import org.eclipse.ui.internal.ide.WorkbenchActionBuilder;
67
import org.eclipse.ui.internal.ide.WorkbenchActionBuilder;
67
import org.eclipse.ui.internal.ide.dialogs.WelcomeEditorInput;
68
import org.eclipse.ui.internal.ide.dialogs.WelcomeEditorInput;
69
import org.eclipse.ui.internal.util.PrefUtil;
68
import org.eclipse.ui.part.EditorInputTransfer;
70
import org.eclipse.ui.part.EditorInputTransfer;
69
import org.eclipse.ui.part.MarkerTransfer;
71
import org.eclipse.ui.part.MarkerTransfer;
70
import org.eclipse.ui.part.ResourceTransfer;
72
import org.eclipse.ui.part.ResourceTransfer;
Lines 202-208 Link Here
202
		// show the shortcut bar and progress indicator, which are hidden by
204
		// show the shortcut bar and progress indicator, which are hidden by
203
		// default
205
		// default
204
		configurer.setShowPerspectiveBar(true);
206
		configurer.setShowPerspectiveBar(true);
205
		configurer.setShowFastViewBars(true);
207
		IPreferenceStore store = PrefUtil.getAPIPreferenceStore();
208
		boolean showFastViewBar = store.getBoolean(IWorkbenchPreferenceConstants.SHOW_FAST_VIEW_BAR);
209
		configurer.setShowFastViewBars(showFastViewBar);
206
		configurer.setShowProgressIndicator(true);
210
		configurer.setShowProgressIndicator(true);
207
211
208
		// add the drag and drop support for the editor area
212
		// add the drag and drop support for the editor area
(-)src/org/eclipse/ui/internal/UIPreferenceInitializer.java (+1 lines)
Lines 86-91 Link Here
86
				true);
86
				true);
87
87
88
		// the fast view bar should be on the bottom of a fresh workspace
88
		// the fast view bar should be on the bottom of a fresh workspace
89
		node.putBoolean(IWorkbenchPreferenceConstants.SHOW_FAST_VIEW_BAR, true); 
89
		node.put(IWorkbenchPreferenceConstants.INITIAL_FAST_VIEW_BAR_LOCATION,
90
		node.put(IWorkbenchPreferenceConstants.INITIAL_FAST_VIEW_BAR_LOCATION,
90
				IWorkbenchPreferenceConstants.BOTTOM);
91
				IWorkbenchPreferenceConstants.BOTTOM);
91
92
(-)Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java (-8 / +9 lines)
Lines 3718-3733 Link Here
3718
		}
3718
		}
3719
3719
3720
		if (fastViewBar != null) {
3720
		if (fastViewBar != null) {
3721
			if (getFastViewBarVisible()
3721
			int side = fastViewBar.getSide();
3722
					&& getWindowConfigurer().getShowFastViewBars()) {
3723
				int side = fastViewBar.getSide();
3724
3722
3725
				if (defaultLayout.getTrim(fastViewBar.getId()) == null) {
3723
			if (defaultLayout.getTrim(fastViewBar.getId()) == null) {
3726
					defaultLayout.addTrim(side, fastViewBar);
3724
				defaultLayout.addTrim(side, fastViewBar);
3727
				}
3725
			}
3726
			if (getFastViewBarVisible()
3727
					&& getWindowConfigurer().getShowFastViewBars())
3728
				fastViewBar.getControl().setVisible(true);
3728
				fastViewBar.getControl().setVisible(true);
3729
			} else {
3729
			else {
3730
				defaultLayout.removeTrim(fastViewBar);
3730
				// defaultLayout.removeTrim(fastViewBar);
3731
				fastViewBar.getControl().setVisible(false);
3731
				fastViewBar.getControl().setVisible(false);
3732
			}
3732
			}
3733
		}
3733
		}
Lines 3782-3787 Link Here
3782
			trimMgr2.update(true, false, !topBar.getVisible());
3782
			trimMgr2.update(true, false, !topBar.getVisible());
3783
		if (trimContributionMgr != null)
3783
		if (trimContributionMgr != null)
3784
			trimContributionMgr.update(true,  !topBar.getVisible());
3784
			trimContributionMgr.update(true,  !topBar.getVisible());
3785
		defaultLayout.forceLayout();
3785
	}
3786
	}
3786
3787
3787
	public boolean getShowFastViewBars() {
3788
	public boolean getShowFastViewBars() {
(-)Eclipse UI/org/eclipse/ui/internal/PlatformUIPreferenceListener.java (+19 lines)
Lines 97-102 Link Here
97
			return;
97
			return;
98
		}
98
		}
99
99
100
		if (IWorkbenchPreferenceConstants.SHOW_FAST_VIEW_BAR
101
				.equals(propertyName)) {
102
			IPreferenceStore apiStore = PrefUtil.getAPIPreferenceStore();
103
			IWorkbench workbench = PlatformUI.getWorkbench();
104
			IWorkbenchWindow[] workbenchWindows = workbench
105
					.getWorkbenchWindows();
106
			for (int i = 0; i < workbenchWindows.length; i++) {
107
				IWorkbenchWindow window = workbenchWindows[i];
108
				if (window instanceof WorkbenchWindow) {
109
					((WorkbenchWindow) window)
110
							.getWindowConfigurer()
111
							.setShowFastViewBars(
112
									apiStore
113
									.getBoolean(IWorkbenchPreferenceConstants.SHOW_FAST_VIEW_BAR));
114
				}
115
			}
116
			return;
117
		}
118
100
		// TODO the banner apperance should have its own preference
119
		// TODO the banner apperance should have its own preference
101
		if (IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS
120
		if (IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS
102
				.equals(propertyName)) {
121
				.equals(propertyName)) {
(-)Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java (+1 lines)
Lines 430-435 Link Here
430
	public static String WorkbenchPreference_useIPersistableEditorButton;
430
	public static String WorkbenchPreference_useIPersistableEditorButton;
431
	public static String WorkbenchPreference_promptWhenStillOpenButton;
431
	public static String WorkbenchPreference_promptWhenStillOpenButton;
432
	public static String WorkbenchPreference_showTextOnPerspectiveBar;
432
	public static String WorkbenchPreference_showTextOnPerspectiveBar;
433
	public static String WorkbenchPreference_showFastViewBar;
433
	public static String WorkbenchPreference_stickyCycleButton;
434
	public static String WorkbenchPreference_stickyCycleButton;
434
	public static String WorkbenchPreference_RunInBackgroundButton;
435
	public static String WorkbenchPreference_RunInBackgroundButton;
435
	public static String WorkbenchPreference_RunInBackgroundToolTip;
436
	public static String WorkbenchPreference_RunInBackgroundToolTip;
(-)Eclipse UI/org/eclipse/ui/internal/messages.properties (+1 lines)
Lines 383-388 Link Here
383
WorkbenchPreference_useIPersistableEditorButton = Restore &editor state on startup
383
WorkbenchPreference_useIPersistableEditorButton = Restore &editor state on startup
384
WorkbenchPreference_promptWhenStillOpenButton = Pr&ompt to save on close even if still open elsewhere
384
WorkbenchPreference_promptWhenStillOpenButton = Pr&ompt to save on close even if still open elsewhere
385
WorkbenchPreference_showTextOnPerspectiveBar = S&how text on the perspective bar
385
WorkbenchPreference_showTextOnPerspectiveBar = S&how text on the perspective bar
386
WorkbenchPreference_showFastViewBar = Show &Fast View bar
386
WorkbenchPreference_stickyCycleButton = Keep &next/previous editor, view and perspectives dialog open
387
WorkbenchPreference_stickyCycleButton = Keep &next/previous editor, view and perspectives dialog open
387
WorkbenchPreference_RunInBackgroundButton=Always r&un in background
388
WorkbenchPreference_RunInBackgroundButton=Always r&un in background
388
WorkbenchPreference_RunInBackgroundToolTip=Run long operations in the background where possible
389
WorkbenchPreference_RunInBackgroundToolTip=Run long operations in the background where possible
(-)Eclipse UI/org/eclipse/ui/internal/FastViewManager.java (-2 / +2 lines)
Lines 323-330 Link Here
323
		}
323
		}
324
324
325
		// Ensure that the trim is displayed
325
		// Ensure that the trim is displayed
326
		if (!trim.getControl().getVisible()) {
326
		if (!(trim instanceof FastViewBar) && !trim.getControl().getVisible()) {
327
			tbm.setTrimVisible(trim, true);
327
			tbm.setTrimVisible(trim, true); 
328
		}
328
		}
329
329
330
		if (trim instanceof FastViewBar) {
330
		if (trim instanceof FastViewBar) {
(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 70-76 Link Here
70
 org.eclipse.ui.internal.testing;x-internal:=true,
70
 org.eclipse.ui.internal.testing;x-internal:=true,
71
 org.eclipse.ui.internal.themes;x-friends:="org.eclipse.ui",
71
 org.eclipse.ui.internal.themes;x-friends:="org.eclipse.ui",
72
 org.eclipse.ui.internal.tweaklets;x-internal:=true,
72
 org.eclipse.ui.internal.tweaklets;x-internal:=true,
73
 org.eclipse.ui.internal.util;x-friends:="org.eclipse.ui,org.eclipse.ui.presentations.r21,org.eclipse.ui.ide",
73
 org.eclipse.ui.internal.util;x-friends:="org.eclipse.ui,org.eclipse.ui.presentations.r21,org.eclipse.ui.ide,org.eclipse.ui.ide.application",
74
 org.eclipse.ui.internal.wizards;x-internal:=true,
74
 org.eclipse.ui.internal.wizards;x-internal:=true,
75
 org.eclipse.ui.internal.wizards.preferences;x-internal:=true,
75
 org.eclipse.ui.internal.wizards.preferences;x-internal:=true,
76
 org.eclipse.ui.intro,
76
 org.eclipse.ui.intro,
(-)Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java (-3 / +39 lines)
Lines 11-20 Link Here
11
11
12
package org.eclipse.ui.internal.dialogs;
12
package org.eclipse.ui.internal.dialogs;
13
13
14
import com.ibm.icu.text.Collator;
14
import java.util.Arrays;
15
import java.util.Arrays;
15
import java.util.Comparator;
16
import java.util.Comparator;
16
import java.util.Locale;
17
import java.util.Locale;
17
18
import org.eclipse.core.runtime.IConfigurationElement;
18
import org.eclipse.core.runtime.IConfigurationElement;
19
import org.eclipse.core.runtime.IProgressMonitor;
19
import org.eclipse.core.runtime.IProgressMonitor;
20
import org.eclipse.core.runtime.IStatus;
20
import org.eclipse.core.runtime.IStatus;
Lines 65-72 Link Here
65
import org.eclipse.ui.themes.ITheme;
65
import org.eclipse.ui.themes.ITheme;
66
import org.eclipse.ui.themes.IThemeManager;
66
import org.eclipse.ui.themes.IThemeManager;
67
67
68
import com.ibm.icu.text.Collator;
69
70
/**
68
/**
71
 * The ViewsPreferencePage is the page used to set preferences for the
69
 * The ViewsPreferencePage is the page used to set preferences for the
72
 * appearance of the workbench. Originally this applied only to views but now
70
 * appearance of the workbench. Originally this applied only to views but now
Lines 76-81 Link Here
76
		IWorkbenchPreferencePage {
74
		IWorkbenchPreferencePage {
77
75
78
	private Button showTextOnPerspectiveBar;
76
	private Button showTextOnPerspectiveBar;
77
	
78
	private Button showFastViewBarButton;
79
79
80
	/*
80
	/*
81
	 * change the tab style of the workbench
81
	 * change the tab style of the workbench
Lines 138-143 Link Here
138
138
139
	private String showTextOnPerspBar = INITIAL_VAL;
139
	private String showTextOnPerspBar = INITIAL_VAL;
140
140
141
	private String showFastViewBar = INITIAL_VAL; 
142
141
	private int editorAlignment;
143
	private int editorAlignment;
142
144
143
	private boolean editorAlignmentChanged = false;
145
	private boolean editorAlignmentChanged = false;
Lines 231-236 Link Here
231
		createViewTabButtonGroup(composite);
233
		createViewTabButtonGroup(composite);
232
		createPerspBarTabButtonGroup(composite);
234
		createPerspBarTabButtonGroup(composite);
233
		createShowTextOnPerspectiveBarPref(composite);
235
		createShowTextOnPerspectiveBarPref(composite);
236
		createShowFastViewBarPref(composite); 
234
		createThemeCombo(composite);
237
		createThemeCombo(composite);
235
		createThemeDescriptionText(composite);
238
		createThemeDescriptionText(composite);
236
		createShowTraditionalStyleTabsPref(composite);
239
		createShowTraditionalStyleTabsPref(composite);
Lines 613-618 Link Here
613
		perspLeftButton.setEnabled(override);
616
		perspLeftButton.setEnabled(override);
614
		perspTopRightButton.setEnabled(override);
617
		perspTopRightButton.setEnabled(override);
615
		showTextOnPerspectiveBar.setEnabled(override);
618
		showTextOnPerspectiveBar.setEnabled(override);
619
		showFastViewBarButton.setEnabled(override); 
616
	}
620
	}
617
621
618
	private void refreshPresentationCombo() {
622
	private void refreshPresentationCombo() {
Lines 778-783 Link Here
778
						.getDefaultBoolean(IWorkbenchPreferenceConstants.SHOW_TEXT_ON_PERSPECTIVE_BAR));
782
						.getDefaultBoolean(IWorkbenchPreferenceConstants.SHOW_TEXT_ON_PERSPECTIVE_BAR));
779
		// text on perspective bar should be set to default on OK or Apply
783
		// text on perspective bar should be set to default on OK or Apply
780
		showTextOnPerspBar = INITIAL_VAL;
784
		showTextOnPerspBar = INITIAL_VAL;
785
		showFastViewBarButton
786
				.setSelection(apiStore
787
						.getDefaultBoolean(IWorkbenchPreferenceConstants.SHOW_FAST_VIEW_BAR));
788
		showFastViewBar = INITIAL_VAL;
781
789
782
		// fast view bar should be set to default on OK or Apply
790
		// fast view bar should be set to default on OK or Apply
783
		fastViewLoc = INITIAL_VAL;
791
		fastViewLoc = INITIAL_VAL;
Lines 855-860 Link Here
855
		showTextOnPerspectiveBar.setSelection(false);
863
		showTextOnPerspectiveBar.setSelection(false);
856
		showTextOnPerspBar = String.valueOf(false);
864
		showTextOnPerspBar = String.valueOf(false);
857
865
866
		showFastViewBarButton.setSelection(true); 
867
		showFastViewBar = String.valueOf(true);
868
858
		// fast view bar on the left (hidden pref, set it directly)
869
		// fast view bar on the left (hidden pref, set it directly)
859
		fastViewLoc = IWorkbenchPreferenceConstants.LEFT;
870
		fastViewLoc = IWorkbenchPreferenceConstants.LEFT;
860
871
Lines 917-922 Link Here
917
928
918
	/**
929
	/**
919
	 * Create the button and text that support setting the preference for
930
	 * Create the button and text that support setting the preference for
931
	 * showing fast view bar.
932
	 */
933
	protected void createShowFastViewBarPref(Composite composite) {
934
		IPreferenceStore apiStore = PrefUtil.getAPIPreferenceStore();
935
936
		showFastViewBarButton = createCheckButton(
937
				composite,
938
				WorkbenchMessages.WorkbenchPreference_showFastViewBar,
939
				apiStore
940
						.getBoolean(IWorkbenchPreferenceConstants.SHOW_FAST_VIEW_BAR));
941
	}
942
943
	/**
944
	 * Create the button and text that support setting the preference for
920
	 * showing text labels on the perspective switching bar
945
	 * showing text labels on the perspective switching bar
921
	 */
946
	 */
922
	protected void createShowTraditionalStyleTabsPref(Composite composite) {
947
	protected void createShowTraditionalStyleTabsPref(Composite composite) {
Lines 974-979 Link Here
974
		showTextOnPerspectiveBar
999
		showTextOnPerspectiveBar
975
				.setSelection(apiStore
1000
				.setSelection(apiStore
976
						.getDefaultBoolean(IWorkbenchPreferenceConstants.SHOW_TEXT_ON_PERSPECTIVE_BAR));
1001
						.getDefaultBoolean(IWorkbenchPreferenceConstants.SHOW_TEXT_ON_PERSPECTIVE_BAR));
1002
		showFastViewBarButton 
1003
				.setSelection(apiStore
1004
						.getDefaultBoolean(IWorkbenchPreferenceConstants.SHOW_FAST_VIEW_BAR));
977
		showTraditionalStyleTabs
1005
		showTraditionalStyleTabs
978
				.setSelection(apiStore
1006
				.setSelection(apiStore
979
						.getDefaultBoolean(IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS));
1007
						.getDefaultBoolean(IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS));
Lines 1039-1044 Link Here
1039
					showTextOnPerspectiveBar.getSelection());
1067
					showTextOnPerspectiveBar.getSelection());
1040
		}
1068
		}
1041
1069
1070
		if (showFastViewBar.equals(INITIAL_VAL) && !override) { 
1071
			apiStore
1072
					.setToDefault(IWorkbenchPreferenceConstants.SHOW_FAST_VIEW_BAR);
1073
		} else {
1074
			apiStore.setValue(IWorkbenchPreferenceConstants.SHOW_FAST_VIEW_BAR,
1075
					showFastViewBarButton.getSelection());
1076
		}
1077
1042
		if (editorAlignmentChanged) {
1078
		if (editorAlignmentChanged) {
1043
			if (editorAlignment == INITIAL_LOC_INT) {
1079
			if (editorAlignment == INITIAL_LOC_INT) {
1044
				apiStore
1080
				apiStore
(-)Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java (+14 lines)
Lines 282-287 Link Here
282
	public static String SHOW_TEXT_ON_PERSPECTIVE_BAR = "SHOW_TEXT_ON_PERSPECTIVE_BAR"; //$NON-NLS-1$
282
	public static String SHOW_TEXT_ON_PERSPECTIVE_BAR = "SHOW_TEXT_ON_PERSPECTIVE_BAR"; //$NON-NLS-1$
283
283
284
	/**
284
	/**
285
	 * A named preference for whether the workbench should show fast view bar.
286
	 * 
287
	 * Boolean-valued: <code>true</code>, if editors should show fast view bar,
288
	 * <code>false</code> otherwise.
289
	 * <p>
290
	 * The default value for this preference is: <code>true</code> (show fast
291
	 * view bar)
292
	 * </p>
293
	 * 
294
	 * @since 3.6
295
	 */
296
	public static String SHOW_FAST_VIEW_BAR = "SHOW_FAST_VIEW_BAR"; //$NON-NLS-1$            
297
298
	/**
285
	 * A named preference for whether the workbench should show the "open
299
	 * A named preference for whether the workbench should show the "open
286
	 * perspective" button on the perspective bar.
300
	 * perspective" button on the perspective bar.
287
	 * 
301
	 * 

Return to bug 278064