Community
Participate
Working Groups
1. Window > Open Perspective > CVS Repository Exploring 2. The 'CVS Repositories' view doesn't have the 'Add CVS Repository' tool item. 3. Resizing the view doesn't help. 4. Close the view. 5. Reopen it. 6. Now it's there. Or maybe not, it didn't come back for Paul anyway.
The workaround is to use the context menu to add it instead (if it never comes back for you).
This is where the item gets disposed. Thread [main] (Suspended (breakpoint at line 433 in ToolItem)) ToolItem.releaseWidget() line: 433 ToolItem(Widget).release(boolean) line: 817 ToolItem(Widget).dispose() line: 446 ToolBarManagerRenderer.hideChild(MElementContainer<MUIElement>, MUIElement) line: 709 PartRenderingEngine.safeRemoveGui(MUIElement) line: 647 PartRenderingEngine.access$2(PartRenderingEngine, MUIElement) line: 636 PartRenderingEngine$6.run() line: 631 SafeRunner.run(ISafeRunnable) line: 42 PartRenderingEngine.removeGui(MUIElement) line: 616 PartRenderingEngine.safeRemoveGui(MUIElement) line: 662 PartRenderingEngine.access$2(PartRenderingEngine, MUIElement) line: 636 PartRenderingEngine$6.run() line: 631 SafeRunner.run(ISafeRunnable) line: 42 PartRenderingEngine.removeGui(MUIElement) line: 616 PerspectiveStackRenderer(LazyStackRenderer).showElementRecursive(MUIElement, List<MUIElement>) line: 265 PerspectiveStackRenderer(LazyStackRenderer).showElementRecursive(MUIElement, List<MUIElement>) line: 330 PerspectiveStackRenderer(LazyStackRenderer).showElementRecursive(MUIElement, List<MUIElement>) line: 336 PerspectiveStackRenderer(LazyStackRenderer).showElementRecursive(MUIElement, List<MUIElement>) line: 336 PerspectiveStackRenderer(LazyStackRenderer).showTab(MUIElement) line: 144 PerspectiveStackRenderer.showTab(MUIElement) line: 109 LazyStackRenderer$1.handleEvent(Event) line: 73 UIEventHandler$1.run() line: 41 UISynchronizer(Synchronizer).syncExec(Runnable) line: 179 UISynchronizer.syncExec(Runnable) line: 150 Display.syncExec(Runnable) line: 4668 E4Application$1.syncExec(Runnable) line: 172 UIEventHandler.handleEvent(Event) line: 38 EventHandlerWrapper.handleEvent(Event, Permission) line: 197 EventHandlerTracker.dispatchEvent(EventHandlerWrapper, Permission, int, Event) line: 197 EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 1 EventManager.dispatchEvent(Set<Entry<K,V>>, EventDispatcher<K,V,E>, int, E) line: 230 ListenerQueue<K,V,E>.dispatchEventSynchronous(int, E) line: 148 EventAdminImpl.dispatchEvent(Event, boolean) line: 135 EventAdminImpl.sendEvent(Event) line: 78 EventComponent.sendEvent(Event) line: 39 EventBroker.send(String, Object) line: 81 UIEventPublisher.notifyChanged(Notification) line: 58 PerspectiveStackImpl(BasicNotifierImpl).eNotify(Notification) line: 380 PerspectiveStackImpl.setSelectedElement(MPerspective) line: 135 PerspectiveStackImpl.setSelectedElement(MUIElement) line: 1 WorkbenchPage.setPerspective(IPerspectiveDescriptor) line: 3116 ShowPerspectiveHandler.openPerspective(String, IWorkbenchWindow) line: 146
The perspective creates the tool bar in the beginning. Then later down the road a recursive 'show' request is forwarded again (see comment 2). Then in the LazyStackRenderer it encounters a part contained within a stack (in its showElementRecursive(*) method) so it, quote unquote, "arbitrarily" destroys the tool bar and then recreates it a few lines down. Normally this wouldn't be a problem but because of the new code we introduced to fix bug 339286 where tool bars don't actually get disposed and unbound, the latter request to create a widget a few lines down does "nothing". That is, we ask the model for a widget and because it has one already it is just returned as-is. The reason this particular tool item goes away is because it is actually physically in the model so while our disposeWidget(Object) method for tool bars does nothing, the renderer does recursively traverse downwards and call removeGui(MUIElement) on each one of its child elements which is why this tool item contribution gets destroyed. The other items in the tool bar are actions so they appear to be unaffected. Thread [main] (Suspended (breakpoint at line 866 in ToolItem)) ToolItem.setToolTipText(String) line: 866 HandledContributionItem.updateToolItem() line: 281 HandledContributionItem.update(String) line: 236 HandledContributionItem.fill(ToolBar, int) line: 204 ToolBarManager.update(boolean) line: 353 ToolBarManagerRenderer.processContents(MElementContainer<MUIElement>) line: 476 PartRenderingEngine.createGui(MUIElement, Object, IEclipseContext) line: 532 StackRenderer.showTab(MUIElement) line: 575 LazyStackRenderer$1.handleEvent(Event) line: 73 UIEventHandler$1.run() line: 41 UISynchronizer(Synchronizer).syncExec(Runnable) line: 179 UISynchronizer.syncExec(Runnable) line: 150 Display.syncExec(Runnable) line: 4668 E4Application$1.syncExec(Runnable) line: 172 UIEventHandler.handleEvent(Event) line: 38 EventHandlerWrapper.handleEvent(Event, Permission) line: 197 EventHandlerTracker.dispatchEvent(EventHandlerWrapper, Permission, int, Event) line: 197 EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 1 EventManager.dispatchEvent(Set<Entry<K,V>>, EventDispatcher<K,V,E>, int, E) line: 230 ListenerQueue<K,V,E>.dispatchEventSynchronous(int, E) line: 148 EventAdminImpl.dispatchEvent(Event, boolean) line: 135 EventAdminImpl.sendEvent(Event) line: 78 EventComponent.sendEvent(Event) line: 39 EventBroker.send(String, Object) line: 81 UIEventPublisher.notifyChanged(Notification) line: 58 PartStackImpl(BasicNotifierImpl).eNotify(Notification) line: 380 PartStackImpl(ElementContainerImpl<T>).setSelectedElement(T) line: 171 StackRenderer(LazyStackRenderer).postProcess(MUIElement) line: 110 PartRenderingEngine.createGui(MUIElement, Object, IEclipseContext) line: 536 PartRenderingEngine.createGui(MUIElement) line: 597 SashRenderer(SWTPartRenderer).processContents(MElementContainer<MUIElement>) line: 59 PartRenderingEngine.createGui(MUIElement, Object, IEclipseContext) line: 532 PartRenderingEngine.createGui(MUIElement) line: 597 PerspectiveRenderer(SWTPartRenderer).processContents(MElementContainer<MUIElement>) line: 59 PerspectiveRenderer.processContents(MElementContainer<MUIElement>) line: 59 PartRenderingEngine.createGui(MUIElement, Object, IEclipseContext) line: 532 PartRenderingEngine.createGui(MUIElement) line: 597 PerspectiveStackRenderer.showTab(MUIElement) line: 103 LazyStackRenderer$1.handleEvent(Event) line: 73 UIEventHandler$1.run() line: 41 UISynchronizer(Synchronizer).syncExec(Runnable) line: 179 UISynchronizer.syncExec(Runnable) line: 150 Display.syncExec(Runnable) line: 4668 E4Application$1.syncExec(Runnable) line: 172 UIEventHandler.handleEvent(Event) line: 38 EventHandlerWrapper.handleEvent(Event, Permission) line: 197 EventHandlerTracker.dispatchEvent(EventHandlerWrapper, Permission, int, Event) line: 197 EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 1 EventManager.dispatchEvent(Set<Entry<K,V>>, EventDispatcher<K,V,E>, int, E) line: 230 ListenerQueue<K,V,E>.dispatchEventSynchronous(int, E) line: 148 EventAdminImpl.dispatchEvent(Event, boolean) line: 135 EventAdminImpl.sendEvent(Event) line: 78 EventComponent.sendEvent(Event) line: 39 EventBroker.send(String, Object) line: 81 UIEventPublisher.notifyChanged(Notification) line: 58 PerspectiveStackImpl(BasicNotifierImpl).eNotify(Notification) line: 380 PerspectiveStackImpl.setSelectedElement(MPerspective) line: 135 PerspectiveStackImpl.setSelectedElement(MUIElement) line: 1 WorkbenchPage.setPerspective(IPerspectiveDescriptor) line: 3116 ShowPerspectiveHandler.openPerspective(String, IWorkbenchWindow) line: 146
Created attachment 191114 [details] ToolBarManagerRenderer patch v1 Change ToolBarManagerRenderer to not dispose any passed in child elements unless they have been rendered by the engine.
Looks good. PW
(In reply to comment #4) > Created attachment 191114 [details] > ToolBarManagerRenderer patch v1 Fix released to CVS HEAD.
Verified with I20110426-0200 on Windows XP.