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 173859 Details for
Bug 318715
Toolbar button ordering broken
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]
make the toolbar predictable v01
order-v01.txt (text/plain), 6.17 KB, created by
Paul Webster
on 2010-07-09 09:53:06 EDT
(
hide
)
Description:
make the toolbar predictable v01
Filename:
MIME Type:
Creator:
Paul Webster
Created:
2010-07-09 09:53:06 EDT
Size:
6.17 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.platform >Index: LegacyIDE.e4xmi >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.platform/Attic/LegacyIDE.e4xmi,v >retrieving revision 1.1.2.20 >diff -u -r1.1.2.20 LegacyIDE.e4xmi >--- LegacyIDE.e4xmi 8 Jul 2010 18:52:17 -0000 1.1.2.20 >+++ LegacyIDE.e4xmi 9 Jul 2010 13:52:34 -0000 >@@ -1,8 +1,6 @@ > <?xml version="1.0" encoding="ASCII"?> > <application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xsi:schemaLocation="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic http://www.eclipse.org/ui/2010/UIModel/application#//ui/basic http://www.eclipse.org/ui/2010/UIModel/application/ui/menu http://www.eclipse.org/ui/2010/UIModel/application#//ui/menu" xmi:id="org.eclipse.e4.legacy.ide.application" elementId="org.eclipse.e4.legacy.ide.application"> > <children xsi:type="basic:TrimmedWindow" xmi:id="IDEWindow" elementId="IDEWindow" label="Eclipse SDK 4.0" width="1024" height="768"> >- <trimBars xmi:id="org.eclipse.ui.main.toolbar" elementId="org.eclipse.ui.main.toolbar"> >- </trimBars> > </children> > <handlers xmi:id="_UW9TY_r3Ed6gmo7caOxU9g" elementId="_UW9TY_r3Ed6gmo7caOxU9g" contributionURI="platform:/plugin/org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.ExitHandler" command="e4.exit"/> > <handlers xmi:id="_BESTZfr3Ed6gmo7caOxU04" elementId="_BESTZfr3Ed6gmo7caOxU04" contributionURI="platform:/plugin/org.eclipse.e4.ui.workbench.swt/org.eclipse.e4.ui.internal.workbench.swt.handlers.ShowViewHandler" command="e4.show.view"/> >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.compatibility/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java,v >retrieving revision 1.65 >diff -u -r1.65 WorkbenchPage.java >--- Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java 8 Jul 2010 15:45:13 -0000 1.65 >+++ Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java 9 Jul 2010 13:52:34 -0000 >@@ -1790,10 +1790,6 @@ > contextService.activateContext(id); > } > >- List<String> ids = ModeledPageLayout.getIds(newPersp, >- ModeledPageLayout.ACTION_SET_TAG); >- legacyWindow.populateTrimContributions(ids, true); >- > legacyWindow.firePerspectiveActivated(WorkbenchPage.this, perspective); > } > }; >Index: Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.compatibility/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java,v >retrieving revision 1.53 >diff -u -r1.53 WorkbenchWindow.java >--- Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java 7 Jul 2010 19:26:52 -0000 1.53 >+++ Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java 9 Jul 2010 13:52:35 -0000 >@@ -131,7 +131,6 @@ > import org.eclipse.ui.internal.actions.CommandAction; > import org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor; > import org.eclipse.ui.internal.e4.compatibility.E4Util; >-import org.eclipse.ui.internal.e4.compatibility.ModeledPageLayout; > import org.eclipse.ui.internal.e4.compatibility.SelectionService; > import org.eclipse.ui.internal.handlers.ActionCommandMappingService; > import org.eclipse.ui.internal.handlers.IActionCommandMappingService; >@@ -487,10 +486,7 @@ > page.setPerspective(perspective); > firePageActivated(); > >- if (curPersp != null) { >- populateTrimContributions(ModeledPageLayout.getIds(curPersp, ACTION_SET_CMD_PREFIX), >- true); >- } >+ populateTrimContributions(); > > Shell shell = (Shell) model.getWidget(); > MMenu mainMenu = model.getMainMenu(); >@@ -537,26 +533,15 @@ > trimBars.remove(trimBar); > } > >- void populateTrimContributions(List<String> actionSets, boolean reload) { >- removeTrimContributions(); >+ void populateTrimContributions() { >+ if (getTopTrim() != null) { >+ throw new IllegalStateException("The top trim is already set"); //$NON-NLS-1$ >+ } >+ MTrimBar trimBar = BasicFactoryImpl.eINSTANCE.createTrimBar(); >+ trimBar.setElementId(MAIN_TOOLBAR_ID); > >- MTrimBar trimBar = getTopTrim(); > fill(trimBar, getCoolBarManager2()); > >- if (false) { >- // TODO don't do this yet, it should be handled by the TrimRenderer >- for (String actionSet : actionSets) { >- MToolBar toolBar = MenuFactoryImpl.eINSTANCE.createToolBar(); >- toolBar.setElementId(actionSet); >- MToolBarSeparator separator = MenuFactoryImpl.eINSTANCE.createToolBarSeparator(); >- separator.setElementId(actionSet); >- separator.setToBeRendered(false); >- toolBar.getChildren().add(separator); >- trimBar.getChildren().add(toolBar); >- workbenchTrimElements.add(toolBar); >- } >- } >- > // TODO why aren't these added as trim contributions > // that would remove everything from this method except the fill(*) > MToolControl spacerControl = MenuFactoryImpl.eINSTANCE.createToolControl(); >@@ -591,6 +576,10 @@ > workbenchTrimElements.add(searchControl); > workbenchTrimElements.add(glueControl); > workbenchTrimElements.add(switcherControl); >+ >+ // and now add it to the model, start the rendering >+ List<MTrimBar> trimBars = model.getTrimBars(); >+ trimBars.add(0, trimBar); > } > > private MTrimBar getTopTrim() { >@@ -600,10 +589,7 @@ > return bar; > } > } >- MTrimBar trimBar = BasicFactoryImpl.eINSTANCE.createTrimBar(); >- trimBar.setElementId(MAIN_TOOLBAR_ID); >- trimBars.add(0, trimBar); >- return trimBar; >+ return null; > } > > private void fill(MMenu menu, IMenuManager manager) { >@@ -731,6 +717,7 @@ > container.getChildren().add(toolBar); > workbenchTrimElements.add(toolBar); > } else if (item instanceof AbstractGroupMarker) { >+ System.out.println("group: " + item.getId()); //$NON-NLS-1$ > MToolBarSeparator separator = MenuFactoryImpl.eINSTANCE.createToolBarSeparator(); > separator.setToBeRendered(item.isVisible()); > separator.setElementId(item.getId());
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 318715
: 173859