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 101202 Details for
Bug 84603
[RCP] [PerspectiveBar] New API or pref to set default perspective bar size
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch proposal for setting the default size via plugin_customization.ini
perspective.patch (text/plain), 2.69 KB, created by
Mark Hoffmann
on 2008-05-21 04:38:31 EDT
(
hide
)
Description:
Patch proposal for setting the default size via plugin_customization.ini
Filename:
MIME Type:
Creator:
Mark Hoffmann
Created:
2008-05-21 04:38:31 EDT
Size:
2.69 KB
patch
obsolete
>Index: Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java,v >retrieving revision 1.61 >diff -u -r1.61 IWorkbenchPreferenceConstants.java >--- Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java 6 May 2008 19:06:55 -0000 1.61 >+++ Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java 21 May 2008 08:36:09 -0000 >@@ -161,7 +161,19 @@ > * > * @since 3.0 > */ >- public static String DOCK_PERSPECTIVE_BAR = "DOCK_PERSPECTIVE_BAR"; //$NON-NLS-1$ >+ public static String DOCK_PERSPECTIVE_BAR = "DOCK_PERSPECTIVE_BAR"; //$NON-NLS-1$ >+ >+ /** >+ * A preference indication the initial size of the perspective bar. The default value is 160. >+ * This preference only works when <code>configurer.setShowPerspectiveBar(true)</code> is set in >+ * WorkbenchWindowAdvisor#preWindowOpen() >+ * >+ * This preference only uses integer values >+ * bug 84603: [RCP] [PerspectiveBar] New API or pref to set default perspective bar size >+ * >+ * @since 3.4 >+ */ >+ public static String PERSPECTIVE_BAR_SIZE = "PERSPECTIVE_BAR_SIZE"; //$NON-NLS-1$ > > /** > * A named preference indicating where the fast view bar should be docked in >Index: Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java,v >retrieving revision 1.62 >diff -u -r1.62 PerspectiveSwitcher.java >--- Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java 24 Mar 2008 19:21:57 -0000 1.62 >+++ Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java 21 May 2008 08:36:09 -0000 >@@ -379,7 +379,19 @@ > StringTokenizer tok = new StringTokenizer(extras, ", "); //$NON-NLS-1$ > int numExtras = tok.countTokens(); > int numPersps = Math.max(numExtras, 1); // assume initial perspective is also listed in extras >- return Math.max(MIN_DEFAULT_WIDTH, MIN_WIDTH + (numPersps*ITEM_WIDTH)); >+ >+ // Fixed bug 84603: [RCP] [PerspectiveBar] New API or pref to set default perspective bar size >+ String sizeString = PrefUtil.getAPIPreferenceStore().getString( >+ IWorkbenchPreferenceConstants.PERSPECTIVE_BAR_SIZE); >+ int size = MIN_DEFAULT_WIDTH; >+ try { >+ size = Integer.parseInt(sizeString); >+ } >+ catch (NumberFormatException e) { >+ // leave size value at MIN_DEFAULT_WIDTH >+ } >+ int defaultWidth = Math.max(MIN_DEFAULT_WIDTH, size); >+ return Math.max(defaultWidth, MIN_WIDTH + (numPersps*ITEM_WIDTH)); > } > > /**
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
Flags:
bokowski
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 84603
: 101202