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

(-)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 (-2 / +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 16-22 Link Here
16
import java.util.Iterator;
17
import java.util.Iterator;
17
import java.util.List;
18
import java.util.List;
18
import java.util.Map;
19
import java.util.Map;
19
20
import org.eclipse.core.runtime.IStatus;
20
import org.eclipse.core.runtime.IStatus;
21
import org.eclipse.core.runtime.Platform;
21
import org.eclipse.core.runtime.Platform;
22
import org.eclipse.core.runtime.Status;
22
import org.eclipse.core.runtime.Status;
Lines 978-981 Link Here
978
	public boolean isResizeable() {
978
	public boolean isResizeable() {
979
		return false;
979
		return false;
980
	}
980
	}
981
	public void checkVisibility() {
982
		getPerspective().getFastViewManager().updateTrim(FASTVIEWBAR_ID);
983
	}
981
}
984
}
(-)Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java (+3 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 503-508 Link Here
503
	public static String OpenViewMode_embed;
504
	public static String OpenViewMode_embed;
504
	public static String OpenViewMode_fast;
505
	public static String OpenViewMode_fast;
505
506
507
	public static String FastViewBar_hide;
508
506
	public static String PerspectivesPreference_MakeDefault;
509
	public static String PerspectivesPreference_MakeDefault;
507
	public static String PerspectivesPreference_MakeDefaultTip;
510
	public static String PerspectivesPreference_MakeDefaultTip;
508
	public static String PerspectivesPreference_Reset;
511
	public static String PerspectivesPreference_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/messages.properties (+3 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 459-464 Link Here
459
OpenViewMode_embed = &Within the perspective
460
OpenViewMode_embed = &Within the perspective
460
OpenViewMode_fast = As &fast view
461
OpenViewMode_fast = As &fast view
461
462
463
FastViewBar_hide = Hide empty fast view bar 
464
462
PerspectivesPreference_MakeDefault = Ma&ke Default
465
PerspectivesPreference_MakeDefault = Ma&ke Default
463
PerspectivesPreference_MakeDefaultTip = Make the Current Selection the Default Perspective
466
PerspectivesPreference_MakeDefaultTip = Make the Current Selection the Default Perspective
464
PerspectivesPreference_Reset = &Reset
467
PerspectivesPreference_Reset = &Reset
(-)Eclipse UI/org/eclipse/ui/internal/FastViewManager.java (-4 / +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 18-24 Link Here
18
import java.util.Iterator;
19
import java.util.Iterator;
19
import java.util.List;
20
import java.util.List;
20
import java.util.Map;
21
import java.util.Map;
21
22
import org.eclipse.core.runtime.MultiStatus;
22
import org.eclipse.core.runtime.MultiStatus;
23
import org.eclipse.jface.util.Geometry;
23
import org.eclipse.jface.util.Geometry;
24
import org.eclipse.swt.SWT;
24
import org.eclipse.swt.SWT;
Lines 303-309 Link Here
303
	 * @param id
303
	 * @param id
304
	 *            The id of the {@link IWindowTrim} to update
304
	 *            The id of the {@link IWindowTrim} to update
305
	 */
305
	 */
306
	private void updateTrim(String id) {
306
	void updateTrim(String id) {
307
		// Get the trim part from the trim manager
307
		// Get the trim part from the trim manager
308
		IWindowTrim trim = tbm.getTrim(id);
308
		IWindowTrim trim = tbm.getTrim(id);
309
309
Lines 313-320 Link Here
313
313
314
		// If there are no fast views for the bar then hide it
314
		// If there are no fast views for the bar then hide it
315
		List fvs = (List) idToFastViewsMap.get(id);
315
		List fvs = (List) idToFastViewsMap.get(id);
316
		if (fvs != null && fvs.size() == 0
316
		boolean hideEmptyFVB = WorkbenchPlugin.getDefault()
317
				&& !FastViewBar.FASTVIEWBAR_ID.equals(id)) {
317
				.getPreferenceStore().getBoolean(IPreferenceConstants.FVB_HIDE);
318
		if ((fvs == null || fvs.size() == 0)
319
				&& (!FastViewBar.FASTVIEWBAR_ID.equals(id) || hideEmptyFVB)) {
318
			if (trim.getControl().getVisible()) {
320
			if (trim.getControl().getVisible()) {
319
				tbm.setTrimVisible(trim, false);
321
				tbm.setTrimVisible(trim, false);
320
				tbm.forceLayout();
322
				tbm.forceLayout();
(-)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/dialogs/PerspectivesPreferencePage.java (-2 / +36 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 15-21 Link Here
15
import java.util.ArrayList;
16
import java.util.ArrayList;
16
import java.util.Collections;
17
import java.util.Collections;
17
import java.util.Comparator;
18
import java.util.Comparator;
18
19
import org.eclipse.jface.dialogs.IDialogConstants;
19
import org.eclipse.jface.dialogs.IDialogConstants;
20
import org.eclipse.jface.dialogs.MessageDialog;
20
import org.eclipse.jface.dialogs.MessageDialog;
21
import org.eclipse.jface.preference.IPreferenceStore;
21
import org.eclipse.jface.preference.IPreferenceStore;
Lines 49-54 Link Here
49
import org.eclipse.ui.internal.WorkbenchMessages;
49
import org.eclipse.ui.internal.WorkbenchMessages;
50
import org.eclipse.ui.internal.WorkbenchPage;
50
import org.eclipse.ui.internal.WorkbenchPage;
51
import org.eclipse.ui.internal.WorkbenchPlugin;
51
import org.eclipse.ui.internal.WorkbenchPlugin;
52
import org.eclipse.ui.internal.WorkbenchWindow;
52
import org.eclipse.ui.internal.registry.PerspectiveDescriptor;
53
import org.eclipse.ui.internal.registry.PerspectiveDescriptor;
53
import org.eclipse.ui.internal.registry.PerspectiveRegistry;
54
import org.eclipse.ui.internal.registry.PerspectiveRegistry;
54
import org.eclipse.ui.internal.util.Descriptors;
55
import org.eclipse.ui.internal.util.Descriptors;
Lines 93-98 Link Here
93
	private Button openEmbedButton;
94
	private Button openEmbedButton;
94
95
95
	private Button openFastButton;
96
	private Button openFastButton;
97
98
	private Button fvbHideButton;
99
	private boolean isFVBConfigured;
96
    
100
    
97
	// labels
101
	// labels
98
	private final String OVM_TITLE = WorkbenchMessages.OpenViewMode_title;
102
	private final String OVM_TITLE = WorkbenchMessages.OpenViewMode_title;
Lines 100-105 Link Here
100
	private final String OVM_EMBED = WorkbenchMessages.OpenViewMode_embed;
104
	private final String OVM_EMBED = WorkbenchMessages.OpenViewMode_embed;
101
105
102
	private final String OVM_FAST = WorkbenchMessages.OpenViewMode_fast; 
106
	private final String OVM_FAST = WorkbenchMessages.OpenViewMode_fast; 
107
	private final String FVB_HIDE = WorkbenchMessages.FastViewBar_hide;
103
108
104
	private final String OPM_TITLE = WorkbenchMessages.OpenPerspectiveMode_optionsTitle; 
109
	private final String OPM_TITLE = WorkbenchMessages.OpenPerspectiveMode_optionsTitle; 
105
110
Lines 133-138 Link Here
133
138
134
		createOpenPerspButtonGroup(composite);
139
		createOpenPerspButtonGroup(composite);
135
		createOpenViewButtonGroup(composite);
140
		createOpenViewButtonGroup(composite);
141
		createFVBHideButton(composite);
136
		createCustomizePerspective(composite);
142
		createCustomizePerspective(composite);
137
143
138
		return composite;
144
		return composite;
Lines 249-254 Link Here
249
255
250
	}
256
	}
251
257
258
	protected void createFVBHideButton(Composite composite) {
259
		if (!isFVBConfigured)
260
			return;
261
		Font font = composite.getFont();
262
		fvbHideButton = new Button(composite, SWT.CHECK);
263
		GridData data = new GridData();
264
		data.horizontalIndent = 10;
265
		fvbHideButton.setLayoutData(data);
266
		fvbHideButton.setText(FVB_HIDE);
267
268
		fvbHideButton.setSelection(this.getPreferenceStore().getBoolean(
269
				IPreferenceConstants.FVB_HIDE));
270
		fvbHideButton.setFont(font);
271
	}
272
252
	/**
273
	/**
253
	 * Create a table of 3 buttons to enable the user to manage customized
274
	 * Create a table of 3 buttons to enable the user to manage customized
254
	 * perspectives.
275
	 * perspectives.
Lines 413-418 Link Here
413
434
414
		openViewMode = store.getInt(IPreferenceConstants.OPEN_VIEW_MODE);
435
		openViewMode = store.getInt(IPreferenceConstants.OPEN_VIEW_MODE);
415
		openPerspMode = store.getInt(IPreferenceConstants.OPEN_PERSP_MODE);
436
		openPerspMode = store.getInt(IPreferenceConstants.OPEN_PERSP_MODE);
437
		isFVBConfigured = ((WorkbenchWindow) workbench
438
				.getActiveWorkbenchWindow()).getShowFastViewBars();
416
	}
439
	}
417
440
418
	/**
441
	/**
Lines 433-438 Link Here
433
		openFastButton
456
		openFastButton
434
				.setSelection(openViewMode == IPreferenceConstants.OVM_FAST);
457
				.setSelection(openViewMode == IPreferenceConstants.OVM_FAST);
435
458
459
		if (isFVBConfigured)
460
			fvbHideButton.setSelection(store
461
					.getDefaultBoolean(IPreferenceConstants.FVB_HIDE));
462
436
		openPerspMode = store
463
		openPerspMode = store
437
				.getDefaultInt(IPreferenceConstants.OPEN_PERSP_MODE);
464
				.getDefaultInt(IPreferenceConstants.OPEN_PERSP_MODE);
438
		openSameWindowButton
465
		openSameWindowButton
Lines 553-558 Link Here
553
		// store the open view mode setting
580
		// store the open view mode setting
554
		store.setValue(IPreferenceConstants.OPEN_VIEW_MODE, openViewMode);
581
		store.setValue(IPreferenceConstants.OPEN_VIEW_MODE, openViewMode);
555
582
583
		if (isFVBConfigured) {
584
			store.setValue(IPreferenceConstants.FVB_HIDE, fvbHideButton
585
					.getSelection());
586
			((WorkbenchWindow) workbench.getActiveWorkbenchWindow())
587
					.getFastViewBar().checkVisibility();
588
		}
589
556
		// store the open perspective mode setting
590
		// store the open perspective mode setting
557
		store.setValue(IPreferenceConstants.OPEN_PERSP_MODE, openPerspMode);
591
		store.setValue(IPreferenceConstants.OPEN_PERSP_MODE, openPerspMode);
558
592
(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 2-8 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %Plugin.name
3
Bundle-Name: %Plugin.name
4
Bundle-SymbolicName: org.eclipse.ui.ide; singleton:=true
4
Bundle-SymbolicName: org.eclipse.ui.ide; singleton:=true
5
Bundle-Version: 3.5.0.qualifier
5
Bundle-Version: 3.5.100.qualifier
6
Bundle-ClassPath: e4-ide.jar,
6
Bundle-ClassPath: e4-ide.jar,
7
 .
7
 .
8
Bundle-Activator: org.eclipse.ui.internal.ide.IDEWorkbenchPlugin
8
Bundle-Activator: org.eclipse.ui.internal.ide.IDEWorkbenchPlugin
(-)src/org/eclipse/ui/internal/ide/dialogs/IDEPerspectivesPreferencePage.java (-1 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2005 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.ide.dialogs;
12
package org.eclipse.ui.internal.ide.dialogs;
12
13
Lines 57-62 Link Here
57
58
58
        createOpenPerspButtonGroup(composite);
59
        createOpenPerspButtonGroup(composite);
59
        createOpenViewButtonGroup(composite);
60
        createOpenViewButtonGroup(composite);
61
        createFVBHideButton(composite);
60
        createProjectPerspectiveGroup(composite);
62
        createProjectPerspectiveGroup(composite);
61
        createCustomizePerspective(composite);
63
        createCustomizePerspective(composite);
62
64

Return to bug 278064