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

(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 2-8 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %pluginName
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.ui.workbench; singleton:=true
4
Bundle-SymbolicName: org.eclipse.ui.workbench; singleton:=true
5
Bundle-Version: 3.5.100.qualifier
5
Bundle-Version: 3.6.0.qualifier
6
Bundle-ClassPath: e4-workbench.jar,
6
Bundle-ClassPath: e4-workbench.jar,
7
 compatibility.jar,
7
 compatibility.jar,
8
 .
8
 .
(-)Eclipse UI/org/eclipse/ui/internal/WorkbenchPreferenceInitializer.java (-1 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2008 IBM Corporation and others.
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Semion Chichelnitsky (semion@il.ibm.com) - bug 278064
10
 *******************************************************************************/
11
 *******************************************************************************/
11
package org.eclipse.ui.internal;
12
package org.eclipse.ui.internal;
12
13
Lines 65-70 Link Here
65
		node.putInt(IPreferenceConstants.EDITOR_TAB_WIDTH, 3); // high
66
		node.putInt(IPreferenceConstants.EDITOR_TAB_WIDTH, 3); // high
66
		node.putInt(IPreferenceConstants.OPEN_VIEW_MODE,
67
		node.putInt(IPreferenceConstants.OPEN_VIEW_MODE,
67
				IPreferenceConstants.OVM_EMBED);
68
				IPreferenceConstants.OVM_EMBED);
69
		node.putBoolean(IPreferenceConstants.FVB_HIDE, false);
68
		node.putInt(IPreferenceConstants.OPEN_PERSP_MODE,
70
		node.putInt(IPreferenceConstants.OPEN_PERSP_MODE,
69
				IPreferenceConstants.OPM_ACTIVE_PAGE);
71
				IPreferenceConstants.OPM_ACTIVE_PAGE);
70
		node.put(IPreferenceConstants.ENABLED_DECORATORS, ""); //$NON-NLS-1$
72
		node.put(IPreferenceConstants.ENABLED_DECORATORS, ""); //$NON-NLS-1$
(-)Eclipse UI/org/eclipse/ui/internal/FastViewBar.java (-1 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004, 2008 IBM Corporation and others.
2
 * Copyright (c) 2004, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 8-13 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Kiryl Kazakevich, Intel - bug 88359
10
 *     Kiryl Kazakevich, Intel - bug 88359
11
 *     Semion Chichelnitsky (semion@il.ibm.com) - bug 278064
11
 *******************************************************************************/
12
 *******************************************************************************/
12
package org.eclipse.ui.internal;
13
package org.eclipse.ui.internal;
13
14
Lines 978-981 Link Here
978
	public boolean isResizeable() {
979
	public boolean isResizeable() {
979
		return false;
980
		return false;
980
	}
981
	}
982
	public void checkVisibility() {
983
		getPerspective().getFastViewManager().updateTrim(FASTVIEWBAR_ID);
984
	}
981
}
985
}
(-)Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java (+4 lines)
Lines 8-13 Link Here
8
 * Contributors:
8
 * Contributors:
9
 * IBM - Initial API and implementation
9
 * IBM - Initial API and implementation
10
 * Sebastian Davids - bug 128529
10
 * Sebastian Davids - bug 128529
11
 * Semion Chichelnitsky (semion@il.ibm.com) - bug 278064
11
 *******************************************************************************/
12
 *******************************************************************************/
12
package org.eclipse.ui.internal;
13
package org.eclipse.ui.internal;
13
14
Lines 499-508 Link Here
499
	public static String OpenPerspectiveMode_sameWindow;
500
	public static String OpenPerspectiveMode_sameWindow;
500
	public static String OpenPerspectiveMode_newWindow;
501
	public static String OpenPerspectiveMode_newWindow;
501
502
503
	public static String FastViewsGroup_title;
502
	public static String OpenViewMode_title;
504
	public static String OpenViewMode_title;
503
	public static String OpenViewMode_embed;
505
	public static String OpenViewMode_embed;
504
	public static String OpenViewMode_fast;
506
	public static String OpenViewMode_fast;
505
507
508
	public static String FastViewBar_hide;
509
506
	public static String PerspectivesPreference_MakeDefault;
510
	public static String PerspectivesPreference_MakeDefault;
507
	public static String PerspectivesPreference_MakeDefaultTip;
511
	public static String PerspectivesPreference_MakeDefaultTip;
508
	public static String PerspectivesPreference_Reset;
512
	public static String PerspectivesPreference_Reset;
(-)Eclipse UI/org/eclipse/ui/internal/messages.properties (-1 / +5 lines)
Lines 11-16 Link Here
11
#        - Fix for Bug 57087
11
#        - Fix for Bug 57087
12
#        - Fix for Bug 138034 [Preferences] Label decorations page - extra space
12
#        - Fix for Bug 138034 [Preferences] Label decorations page - extra space
13
#        - Fix for Bug 128529
13
#        - Fix for Bug 128529
14
#     Semion Chichelnitsky (semion@il.ibm.com) - bug 278064
14
###############################################################################
15
###############################################################################
15
16
16
# package: org.eclipse.ui
17
# package: org.eclipse.ui
Lines 455-464 Link Here
455
OpenPerspectiveMode_sameWindow = In the &same window
456
OpenPerspectiveMode_sameWindow = In the &same window
456
OpenPerspectiveMode_newWindow = In a &new window
457
OpenPerspectiveMode_newWindow = In a &new window
457
458
458
OpenViewMode_title = Open a new view
459
FastViewsGroup_title = Fast Views
460
OpenViewMode_title = Open a new view:
459
OpenViewMode_embed = &Within the perspective
461
OpenViewMode_embed = &Within the perspective
460
OpenViewMode_fast = As &fast view
462
OpenViewMode_fast = As &fast view
461
463
464
FastViewBar_hide = &Hide empty fast view bar 
465
462
PerspectivesPreference_MakeDefault = Ma&ke Default
466
PerspectivesPreference_MakeDefault = Ma&ke Default
463
PerspectivesPreference_MakeDefaultTip = Make the Current Selection the Default Perspective
467
PerspectivesPreference_MakeDefaultTip = Make the Current Selection the Default Perspective
464
PerspectivesPreference_Reset = &Reset
468
PerspectivesPreference_Reset = &Reset
(-)Eclipse UI/org/eclipse/ui/internal/IPreferenceConstants.java (-1 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2008 IBM Corporation and others.
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Semion Chichelnitsky (semion@il.ibm.com) - bug 278064
10
 *******************************************************************************/
11
 *******************************************************************************/
11
12
12
package org.eclipse.ui.internal;
13
package org.eclipse.ui.internal;
Lines 61-66 Link Here
61
62
62
    public static final int OVM_FLOAT = 2;
63
    public static final int OVM_FLOAT = 2;
63
64
65
	// Boolean: true = hide fast view bar, when it is empty
66
	public static final String FVB_HIDE = "FVB_HIDE"; //$NON-NLS-1$
67
64
    // (int) Mode for opening a new perspective
68
    // (int) Mode for opening a new perspective
65
    public static final String OPEN_PERSP_MODE = "OPEN_PERSPECTIVE_MODE"; //$NON-NLS-1$
69
    public static final String OPEN_PERSP_MODE = "OPEN_PERSPECTIVE_MODE"; //$NON-NLS-1$
66
70
(-)Eclipse UI/org/eclipse/ui/internal/FastViewManager.java (-3 / +6 lines)
Lines 9-14 Link Here
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Carlos Devoto carlos.devoto@compuware.com Bug 213645
10
 *     Carlos Devoto carlos.devoto@compuware.com Bug 213645
11
 *     Markus Alexander Kuppe, Versant Corporation - bug #215797
11
 *     Markus Alexander Kuppe, Versant Corporation - bug #215797
12
 *     Semion Chichelnitsky (semion@il.ibm.com) - bug 278064
12
 *******************************************************************************/
13
 *******************************************************************************/
13
14
14
package org.eclipse.ui.internal;
15
package org.eclipse.ui.internal;
Lines 303-309 Link Here
303
	 * @param id
304
	 * @param id
304
	 *            The id of the {@link IWindowTrim} to update
305
	 *            The id of the {@link IWindowTrim} to update
305
	 */
306
	 */
306
	private void updateTrim(String id) {
307
	void updateTrim(String id) {
307
		// Get the trim part from the trim manager
308
		// Get the trim part from the trim manager
308
		IWindowTrim trim = tbm.getTrim(id);
309
		IWindowTrim trim = tbm.getTrim(id);
309
310
Lines 313-320 Link Here
313
314
314
		// If there are no fast views for the bar then hide it
315
		// If there are no fast views for the bar then hide it
315
		List fvs = (List) idToFastViewsMap.get(id);
316
		List fvs = (List) idToFastViewsMap.get(id);
316
		if (fvs != null && fvs.size() == 0
317
		boolean hideEmptyFVB = WorkbenchPlugin.getDefault()
317
				&& !FastViewBar.FASTVIEWBAR_ID.equals(id)) {
318
				.getPreferenceStore().getBoolean(IPreferenceConstants.FVB_HIDE);
319
		if ((fvs == null || fvs.size() == 0)
320
				&& (!FastViewBar.FASTVIEWBAR_ID.equals(id) || hideEmptyFVB)) {
318
			if (trim.getControl().getVisible()) {
321
			if (trim.getControl().getVisible()) {
319
				tbm.setTrimVisible(trim, false);
322
				tbm.setTrimVisible(trim, false);
320
				tbm.forceLayout();
323
				tbm.forceLayout();
(-)Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java (-2 / +51 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2007 IBM Corporation and others.
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Semion Chichelnitsky (semion@il.ibm.com) - bug 278064
10
 *******************************************************************************/
11
 *******************************************************************************/
11
12
12
package org.eclipse.ui.internal.dialogs;
13
package org.eclipse.ui.internal.dialogs;
Lines 49-54 Link Here
49
import org.eclipse.ui.internal.WorkbenchMessages;
50
import org.eclipse.ui.internal.WorkbenchMessages;
50
import org.eclipse.ui.internal.WorkbenchPage;
51
import org.eclipse.ui.internal.WorkbenchPage;
51
import org.eclipse.ui.internal.WorkbenchPlugin;
52
import org.eclipse.ui.internal.WorkbenchPlugin;
53
import org.eclipse.ui.internal.WorkbenchWindow;
52
import org.eclipse.ui.internal.registry.PerspectiveDescriptor;
54
import org.eclipse.ui.internal.registry.PerspectiveDescriptor;
53
import org.eclipse.ui.internal.registry.PerspectiveRegistry;
55
import org.eclipse.ui.internal.registry.PerspectiveRegistry;
54
import org.eclipse.ui.internal.util.Descriptors;
56
import org.eclipse.ui.internal.util.Descriptors;
Lines 81-86 Link Here
81
	private Button setDefaultButton;
83
	private Button setDefaultButton;
82
84
83
	// widgets for open perspective mode;
85
	// widgets for open perspective mode;
86
	private Label openViewModeLabel;
87
84
	private Button openSameWindowButton;
88
	private Button openSameWindowButton;
85
89
86
	private Button openNewWindowButton;
90
	private Button openNewWindowButton;
Lines 93-106 Link Here
93
	private Button openEmbedButton;
97
	private Button openEmbedButton;
94
98
95
	private Button openFastButton;
99
	private Button openFastButton;
100
101
	private Button fvbHideButton;
102
	
103
	private boolean isFVBConfigured;
96
    
104
    
97
	// labels
105
	// labels
106
	private final String FVG_TITLE = WorkbenchMessages.FastViewsGroup_title;
107
98
	private final String OVM_TITLE = WorkbenchMessages.OpenViewMode_title;
108
	private final String OVM_TITLE = WorkbenchMessages.OpenViewMode_title;
99
109
100
	private final String OVM_EMBED = WorkbenchMessages.OpenViewMode_embed;
110
	private final String OVM_EMBED = WorkbenchMessages.OpenViewMode_embed;
101
111
102
	private final String OVM_FAST = WorkbenchMessages.OpenViewMode_fast; 
112
	private final String OVM_FAST = WorkbenchMessages.OpenViewMode_fast; 
103
113
114
	private final String FVB_HIDE = WorkbenchMessages.FastViewBar_hide;
115
104
	private final String OPM_TITLE = WorkbenchMessages.OpenPerspectiveMode_optionsTitle; 
116
	private final String OPM_TITLE = WorkbenchMessages.OpenPerspectiveMode_optionsTitle; 
105
117
106
	private final String OPM_SAME_WINDOW = WorkbenchMessages.OpenPerspectiveMode_sameWindow; 
118
	private final String OPM_SAME_WINDOW = WorkbenchMessages.OpenPerspectiveMode_sameWindow; 
Lines 213-225 Link Here
213
		Font font = composite.getFont();
225
		Font font = composite.getFont();
214
226
215
		Group buttonComposite = new Group(composite, SWT.LEFT);
227
		Group buttonComposite = new Group(composite, SWT.LEFT);
216
		buttonComposite.setText(OVM_TITLE);
228
		buttonComposite.setText(FVG_TITLE);
217
		buttonComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
229
		buttonComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
218
		buttonComposite.setFont(composite.getFont());
230
		buttonComposite.setFont(composite.getFont());
219
		GridLayout layout = new GridLayout();
231
		GridLayout layout = new GridLayout();
220
		layout.numColumns = 2;
232
		layout.numColumns = 2;
221
		buttonComposite.setLayout(layout);
233
		buttonComposite.setLayout(layout);
222
234
235
		openViewModeLabel = new Label(buttonComposite, SWT.NONE);
236
		openViewModeLabel.setText(OVM_TITLE);
237
		GridData data = new GridData();
238
		data.horizontalSpan = 2;
239
		openViewModeLabel.setLayoutData(data);
240
223
		openEmbedButton = new Button(buttonComposite, SWT.RADIO);
241
		openEmbedButton = new Button(buttonComposite, SWT.RADIO);
224
		openEmbedButton.setText(OVM_EMBED);
242
		openEmbedButton.setText(OVM_EMBED);
225
		openEmbedButton
243
		openEmbedButton
Lines 247-252 Link Here
247
		});
265
		});
248
		openFastButton.setFont(font);
266
		openFastButton.setFont(font);
249
267
268
		createFVBHideButton(buttonComposite);
269
	}
270
271
	protected void createFVBHideButton(Composite composite) {
272
		if (!isFVBConfigured)
273
			return;
274
		Font font = composite.getFont();
275
		fvbHideButton = new Button(composite, SWT.CHECK);
276
		GridData data = new GridData();
277
		// data.horizontalIndent = 10;
278
		data.horizontalSpan = 2;
279
		fvbHideButton.setLayoutData(data);
280
		fvbHideButton.setText(FVB_HIDE);
281
282
		fvbHideButton.setSelection(this.getPreferenceStore().getBoolean(
283
				IPreferenceConstants.FVB_HIDE));
284
		fvbHideButton.setFont(font);
250
	}
285
	}
251
286
252
	/**
287
	/**
Lines 413-418 Link Here
413
448
414
		openViewMode = store.getInt(IPreferenceConstants.OPEN_VIEW_MODE);
449
		openViewMode = store.getInt(IPreferenceConstants.OPEN_VIEW_MODE);
415
		openPerspMode = store.getInt(IPreferenceConstants.OPEN_PERSP_MODE);
450
		openPerspMode = store.getInt(IPreferenceConstants.OPEN_PERSP_MODE);
451
		isFVBConfigured = ((WorkbenchWindow) workbench
452
				.getActiveWorkbenchWindow()).getShowFastViewBars();
453
416
	}
454
	}
417
455
418
	/**
456
	/**
Lines 433-438 Link Here
433
		openFastButton
471
		openFastButton
434
				.setSelection(openViewMode == IPreferenceConstants.OVM_FAST);
472
				.setSelection(openViewMode == IPreferenceConstants.OVM_FAST);
435
473
474
		if (isFVBConfigured)
475
			fvbHideButton.setSelection(store
476
					.getDefaultBoolean(IPreferenceConstants.FVB_HIDE));
477
436
		openPerspMode = store
478
		openPerspMode = store
437
				.getDefaultInt(IPreferenceConstants.OPEN_PERSP_MODE);
479
				.getDefaultInt(IPreferenceConstants.OPEN_PERSP_MODE);
438
		openSameWindowButton
480
		openSameWindowButton
Lines 553-558 Link Here
553
		// store the open view mode setting
595
		// store the open view mode setting
554
		store.setValue(IPreferenceConstants.OPEN_VIEW_MODE, openViewMode);
596
		store.setValue(IPreferenceConstants.OPEN_VIEW_MODE, openViewMode);
555
597
598
		if (isFVBConfigured) {
599
			store.setValue(IPreferenceConstants.FVB_HIDE, fvbHideButton
600
					.getSelection());
601
			((WorkbenchWindow) workbench.getActiveWorkbenchWindow())
602
					.getFastViewBar().checkVisibility();
603
		}
604
556
		// store the open perspective mode setting
605
		// store the open perspective mode setting
557
		store.setValue(IPreferenceConstants.OPEN_PERSP_MODE, openPerspMode);
606
		store.setValue(IPreferenceConstants.OPEN_PERSP_MODE, openPerspMode);
558
607

Return to bug 278064