Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 145463 Details for
Bug 278064
[FastView] Ability to hide fast view toolbar
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Slightly modified version of Semion's patch
patch(278064) (text/plain), 13.63 KB, created by
Eric Moffatt
on 2009-08-24 13:53:52 EDT
(
hide
)
Description:
Slightly modified version of Semion's patch
Filename:
MIME Type:
Creator:
Eric Moffatt
Created:
2009-08-24 13:53:52 EDT
Size:
13.63 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java,v >retrieving revision 1.120 >diff -u -r1.120 WorkbenchMessages.java >--- Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java 13 Aug 2009 07:17:43 -0000 1.120 >+++ Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java 24 Aug 2009 17:44:45 -0000 >@@ -8,6 +8,7 @@ > * Contributors: > * IBM - Initial API and implementation > * Sebastian Davids - bug 128529 >+ * Semion Chichelnitsky (semion@il.ibm.com) - bug 278064 > *******************************************************************************/ > package org.eclipse.ui.internal; > >@@ -499,10 +500,13 @@ > public static String OpenPerspectiveMode_sameWindow; > public static String OpenPerspectiveMode_newWindow; > >+ public static String FastViewsGroup_title; > public static String OpenViewMode_title; > public static String OpenViewMode_embed; > public static String OpenViewMode_fast; > >+ public static String FastViewBar_hide; >+ > public static String PerspectivesPreference_MakeDefault; > public static String PerspectivesPreference_MakeDefaultTip; > public static String PerspectivesPreference_Reset; >Index: Eclipse UI/org/eclipse/ui/internal/IPreferenceConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IPreferenceConstants.java,v >retrieving revision 1.64 >diff -u -r1.64 IPreferenceConstants.java >--- Eclipse UI/org/eclipse/ui/internal/IPreferenceConstants.java 11 Apr 2008 18:14:50 -0000 1.64 >+++ Eclipse UI/org/eclipse/ui/internal/IPreferenceConstants.java 24 Aug 2009 17:44:45 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2008 IBM Corporation and others. >+ * Copyright (c) 2000, 2009 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Semion Chichelnitsky (semion@il.ibm.com) - bug 278064 > *******************************************************************************/ > > package org.eclipse.ui.internal; >@@ -61,6 +62,9 @@ > > public static final int OVM_FLOAT = 2; > >+ // Boolean: true = hide fast view bar, when it is empty >+ public static final String FVB_HIDE = "FVB_HIDE"; //$NON-NLS-1$ >+ > // (int) Mode for opening a new perspective > public static final String OPEN_PERSP_MODE = "OPEN_PERSPECTIVE_MODE"; //$NON-NLS-1$ > >Index: Eclipse UI/org/eclipse/ui/internal/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties,v >retrieving revision 1.402 >diff -u -r1.402 messages.properties >--- Eclipse UI/org/eclipse/ui/internal/messages.properties 13 Aug 2009 07:17:43 -0000 1.402 >+++ Eclipse UI/org/eclipse/ui/internal/messages.properties 24 Aug 2009 17:44:45 -0000 >@@ -11,6 +11,7 @@ > # - Fix for Bug 57087 > # - Fix for Bug 138034 [Preferences] Label decorations page - extra space > # - Fix for Bug 128529 >+# Semion Chichelnitsky (semion@il.ibm.com) - bug 278064 > ############################################################################### > > # package: org.eclipse.ui >@@ -455,10 +456,13 @@ > OpenPerspectiveMode_sameWindow = In the &same window > OpenPerspectiveMode_newWindow = In a &new window > >-OpenViewMode_title = Open a new view >+FastViewsGroup_title = Fast Views >+OpenViewMode_title = Open a new view: > OpenViewMode_embed = &Within the perspective > OpenViewMode_fast = As &fast view > >+FastViewBar_hide = &Hide empty fast view bar >+ > PerspectivesPreference_MakeDefault = Ma&ke Default > PerspectivesPreference_MakeDefaultTip = Make the Current Selection the Default Perspective > PerspectivesPreference_Reset = &Reset >Index: Eclipse UI/org/eclipse/ui/internal/FastViewManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewManager.java,v >retrieving revision 1.28 >diff -u -r1.28 FastViewManager.java >--- Eclipse UI/org/eclipse/ui/internal/FastViewManager.java 25 May 2009 20:52:11 -0000 1.28 >+++ Eclipse UI/org/eclipse/ui/internal/FastViewManager.java 24 Aug 2009 17:44:45 -0000 >@@ -9,6 +9,7 @@ > * IBM Corporation - initial API and implementation > * Carlos Devoto carlos.devoto@compuware.com Bug 213645 > * Markus Alexander Kuppe, Versant Corporation - bug #215797 >+ * Semion Chichelnitsky (semion@il.ibm.com) - bug 278064 > *******************************************************************************/ > > package org.eclipse.ui.internal; >@@ -18,7 +19,6 @@ > import java.util.Iterator; > import java.util.List; > import java.util.Map; >- > import org.eclipse.core.runtime.MultiStatus; > import org.eclipse.jface.util.Geometry; > import org.eclipse.swt.SWT; >@@ -303,7 +303,7 @@ > * @param id > * The id of the {@link IWindowTrim} to update > */ >- private void updateTrim(String id) { >+ public void updateTrim(String id) { > // Get the trim part from the trim manager > IWindowTrim trim = tbm.getTrim(id); > >@@ -313,8 +313,10 @@ > > // If there are no fast views for the bar then hide it > List fvs = (List) idToFastViewsMap.get(id); >- if (fvs != null && fvs.size() == 0 >- && !FastViewBar.FASTVIEWBAR_ID.equals(id)) { >+ boolean hideEmptyFVB = WorkbenchPlugin.getDefault() >+ .getPreferenceStore().getBoolean(IPreferenceConstants.FVB_HIDE); >+ if ((fvs == null || fvs.size() == 0) >+ && (!FastViewBar.FASTVIEWBAR_ID.equals(id) || hideEmptyFVB)) { > if (trim.getControl().getVisible()) { > tbm.setTrimVisible(trim, false); > tbm.forceLayout(); >Index: Eclipse UI/org/eclipse/ui/internal/WorkbenchPreferenceInitializer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPreferenceInitializer.java,v >retrieving revision 1.40 >diff -u -r1.40 WorkbenchPreferenceInitializer.java >--- Eclipse UI/org/eclipse/ui/internal/WorkbenchPreferenceInitializer.java 6 May 2008 19:06:55 -0000 1.40 >+++ Eclipse UI/org/eclipse/ui/internal/WorkbenchPreferenceInitializer.java 24 Aug 2009 17:44:45 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2008 IBM Corporation and others. >+ * Copyright (c) 2000, 2009 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Semion Chichelnitsky (semion@il.ibm.com) - bug 278064 > *******************************************************************************/ > package org.eclipse.ui.internal; > >@@ -65,6 +66,7 @@ > node.putInt(IPreferenceConstants.EDITOR_TAB_WIDTH, 3); // high > node.putInt(IPreferenceConstants.OPEN_VIEW_MODE, > IPreferenceConstants.OVM_EMBED); >+ node.putBoolean(IPreferenceConstants.FVB_HIDE, false); > node.putInt(IPreferenceConstants.OPEN_PERSP_MODE, > IPreferenceConstants.OPM_ACTIVE_PAGE); > node.put(IPreferenceConstants.ENABLED_DECORATORS, ""); //$NON-NLS-1$ >Index: Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java,v >retrieving revision 1.35 >diff -u -r1.35 PerspectivesPreferencePage.java >--- Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java 30 Nov 2007 14:45:11 -0000 1.35 >+++ Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java 24 Aug 2009 17:44:45 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2007 IBM Corporation and others. >+ * Copyright (c) 2000, 2009 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Semion Chichelnitsky (semion@il.ibm.com) - bug 278064 > *******************************************************************************/ > > package org.eclipse.ui.internal.dialogs; >@@ -15,7 +16,6 @@ > import java.util.ArrayList; > import java.util.Collections; > import java.util.Comparator; >- > import org.eclipse.jface.dialogs.IDialogConstants; > import org.eclipse.jface.dialogs.MessageDialog; > import org.eclipse.jface.preference.IPreferenceStore; >@@ -44,11 +44,14 @@ > import org.eclipse.ui.IWorkbenchPreferencePage; > import org.eclipse.ui.IWorkbenchWindow; > import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.internal.FastViewBar; >+import org.eclipse.ui.internal.FastViewManager; > import org.eclipse.ui.internal.IPreferenceConstants; > import org.eclipse.ui.internal.IWorkbenchHelpContextIds; > import org.eclipse.ui.internal.WorkbenchMessages; > import org.eclipse.ui.internal.WorkbenchPage; > import org.eclipse.ui.internal.WorkbenchPlugin; >+import org.eclipse.ui.internal.WorkbenchWindow; > import org.eclipse.ui.internal.registry.PerspectiveDescriptor; > import org.eclipse.ui.internal.registry.PerspectiveRegistry; > import org.eclipse.ui.internal.util.Descriptors; >@@ -81,6 +84,8 @@ > private Button setDefaultButton; > > // widgets for open perspective mode; >+ private Label openViewModeLabel; >+ > private Button openSameWindowButton; > > private Button openNewWindowButton; >@@ -93,14 +98,22 @@ > private Button openEmbedButton; > > private Button openFastButton; >+ >+ private Button fvbHideButton; >+ >+ private boolean isFVBConfigured; > > // labels >+ private final String FVG_TITLE = WorkbenchMessages.FastViewsGroup_title; >+ > private final String OVM_TITLE = WorkbenchMessages.OpenViewMode_title; > > private final String OVM_EMBED = WorkbenchMessages.OpenViewMode_embed; > > private final String OVM_FAST = WorkbenchMessages.OpenViewMode_fast; > >+ private final String FVB_HIDE = WorkbenchMessages.FastViewBar_hide; >+ > private final String OPM_TITLE = WorkbenchMessages.OpenPerspectiveMode_optionsTitle; > > private final String OPM_SAME_WINDOW = WorkbenchMessages.OpenPerspectiveMode_sameWindow; >@@ -213,13 +226,19 @@ > Font font = composite.getFont(); > > Group buttonComposite = new Group(composite, SWT.LEFT); >- buttonComposite.setText(OVM_TITLE); >+ buttonComposite.setText(FVG_TITLE); > buttonComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); > buttonComposite.setFont(composite.getFont()); > GridLayout layout = new GridLayout(); > layout.numColumns = 2; > buttonComposite.setLayout(layout); > >+ openViewModeLabel = new Label(buttonComposite, SWT.NONE); >+ openViewModeLabel.setText(OVM_TITLE); >+ GridData data = new GridData(); >+ data.horizontalSpan = 2; >+ openViewModeLabel.setLayoutData(data); >+ > openEmbedButton = new Button(buttonComposite, SWT.RADIO); > openEmbedButton.setText(OVM_EMBED); > openEmbedButton >@@ -247,6 +266,23 @@ > }); > openFastButton.setFont(font); > >+ createFVBHideButton(buttonComposite); >+ } >+ >+ protected void createFVBHideButton(Composite composite) { >+ if (!isFVBConfigured) >+ return; >+ Font font = composite.getFont(); >+ fvbHideButton = new Button(composite, SWT.CHECK); >+ GridData data = new GridData(); >+ // data.horizontalIndent = 10; >+ data.horizontalSpan = 2; >+ fvbHideButton.setLayoutData(data); >+ fvbHideButton.setText(FVB_HIDE); >+ >+ fvbHideButton.setSelection(this.getPreferenceStore().getBoolean( >+ IPreferenceConstants.FVB_HIDE)); >+ fvbHideButton.setFont(font); > } > > /** >@@ -413,6 +449,9 @@ > > openViewMode = store.getInt(IPreferenceConstants.OPEN_VIEW_MODE); > openPerspMode = store.getInt(IPreferenceConstants.OPEN_PERSP_MODE); >+ isFVBConfigured = ((WorkbenchWindow) workbench >+ .getActiveWorkbenchWindow()).getShowFastViewBars(); >+ > } > > /** >@@ -433,6 +472,10 @@ > openFastButton > .setSelection(openViewMode == IPreferenceConstants.OVM_FAST); > >+ if (isFVBConfigured) >+ fvbHideButton.setSelection(store >+ .getDefaultBoolean(IPreferenceConstants.FVB_HIDE)); >+ > openPerspMode = store > .getDefaultInt(IPreferenceConstants.OPEN_PERSP_MODE); > openSameWindowButton >@@ -553,6 +596,17 @@ > // store the open view mode setting > store.setValue(IPreferenceConstants.OPEN_VIEW_MODE, openViewMode); > >+ if (isFVBConfigured) { >+ store.setValue(IPreferenceConstants.FVB_HIDE, fvbHideButton >+ .getSelection()); >+ WorkbenchPage page = (WorkbenchPage) workbench >+ .getActiveWorkbenchWindow().getActivePage(); >+ FastViewManager fvm = page.getActivePerspective() >+ .getFastViewManager(); >+ if (fvm != null) >+ fvm.updateTrim(FastViewBar.FASTVIEWBAR_ID); >+ } >+ > // store the open perspective mode setting > store.setValue(IPreferenceConstants.OPEN_PERSP_MODE, openPerspMode); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 278064
:
143913
|
144617
|
145353
| 145463