Community
Participate
Working Groups
If an editor updates its action bars and adds menus or tool items, they don't show up. The menus and toolbars have snapshots taken when they are created and then the model is used from then on, and that doesn't handle updates. PW
The editor toolbar (from the editor action bars, as opposed to an actionSetPartAssociation) now appears for editors that use one. After the quickaccess text and perspective switcher. Doh! PW
This is a result of a misunderstanding about how the PRE works...it's *imperative* that the widget that gets bound to the model element is the one that represents the element. In this case the TrimBarRenderer was 'wrapping' the toolbars in a composite but not adjusting the bound widget. If we revert the change to the TrimBarRenderer then all is well except that we don't get the separators anymore... Likely we will have to go back to the old-style where the renderer for the Toolbars will create the composite...this implies that any code that currently thinks that <MToolBar>.getWidget() is an SWT toolbar will need to be adjusted. Note that the current code also affects the layout behavior for minimized stacks, causing cheese...
Created attachment 196041 [details] Patch to clean up TB rendering This also seems to address: bug 341497 Minimized editor is clipped bug 345193 Too many icon separators in toolbar as well as 'most' of the extra separators...
Comment on attachment 196041 [details] Patch to clean up TB rendering (In reply to comment #3) > This also seems to address: > > bug 341497 Minimized editor is clipped Check. > bug 345193 Too many icon separators in toolbar Check. Bug 346096 also seems to be good also. PartRenderingEngineTests now has several additional failures. 'Problems' view doesn't have a view menu. In fact, the whole bottom stack is screwed, changing the selection of the bottom stack will cause exceptions. java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:4258) at org.eclipse.swt.SWT.error(SWT.java:4192) at org.eclipse.swt.SWT.error(SWT.java:4163) at org.eclipse.e4.ui.widgets.CTabFolder.removeTabControl(CTabFolder.java:3785) at org.eclipse.e4.ui.widgets.CTabFolder.setTopRight(CTabFolder.java:3383) at org.eclipse.e4.ui.widgets.CTabFolder.setTopRight(CTabFolder.java:3348) at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.hideElementRecursive(LazyStackRenderer.java:162) at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.access$0(LazyStackRenderer.java:143) at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:64) at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4681) at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:182) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81) at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380) at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171) at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer$3.widgetSelected(StackRenderer.java:484) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774) at org.eclipse.e4.ui.widgets.CTabFolder.setSelection(CTabFolder.java:2991) at org.eclipse.e4.ui.widgets.CTabFolder.onMouse(CTabFolder.java:1707) at org.eclipse.e4.ui.widgets.CTabFolder$1.handleEvent(CTabFolder.java:270) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4163) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:944)
Editor toolbars also disappear ('Toggle Mark Occurrences', 'Show Whitespace Characters', etc.) with the suggested patch.
Created attachment 196240 [details] Revised patch to address view Menu / TB Issues NOTE: While there are still some glitches in this solution I'd rather go with this because it re-arranges how the various TB's get rendered (the cause of a number of known issues)... There is still some issue on being too aggressive on 'DisposeToolbarIfNecessary', causing the java editor's toolbar to only appear after doing a 'Window->New Window'. There are still some gaps after switching between the Java and Compare editors, not sure why yet.
(In reply to comment #6) > NOTE: While there are still some glitches in this solution I'd rather go with > this because it re-arranges how the various TB's get rendered (the cause of a > number of known issues)... > > There is still some issue on being too aggressive on > 'DisposeToolbarIfNecessary', causing the java editor's toolbar to only appear > after doing a 'Window->New Window'. > that toolbar is constructed by actionSets. So when the empty window is coming up, there will never be any SWT toolitems in the toolbar. They show up later, when the perspective activates the actionSets for the actionSetPartAssociations. PW
Committed in >20100520. Applied the patch. Checking in the big changes, we'll tackle the edges I've created next...
Created attachment 196469 [details] Stack rendering patch v1 If you have both the 'Package Explorer' and 'Project Explorer' in the same stack, switching between them will not make the view menu immediately visible. Forcing a layout by resizing the stack will bring them back.
Created attachment 196475 [details] Patch to clean up missing TB's This strategy allows 'empty' managed toolbars (i.e. a Composite with two toolbars, the second of which has no items) to exist and filters them out in the TrimBarLayout...
Committed in >20110524. Applied the patch.
Verified in I20110604-2201