Community
Participate
Working Groups
1. Put a breakpoint in PartServiceImpl's activate(MPart) method. 2. Start your inner. 3. Click the 'Package Explorer' to activate it. 4. Context menu > New > Untitled Text File 5. The editor's parent context is the window. :(
We get the window's context here. It seems there is a problem with the renderer here. Thread [main] (Suspended (breakpoint at line 266 in EclipseContext)) EclipseContext.<init>(IEclipseContext, ILookupStrategy) line: 266 EclipseContext.createChild() line: 739 EclipseContext.createChild(String) line: 743 PartRenderingEngine.createGui(MUIElement, Object) line: 286 PartRenderingEngine.createGui(MUIElement) line: 407 StackRenderer.showTab(MUIElement) line: 457 LazyStackRenderer$1.handleEvent(Event) line: 66 UIEventHandler.handleEvent(Event) line: 41 EventHandlerWrapper.handleEvent(Event, Permission) line: 188 EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 198 EventManager.dispatchEvent(Set, EventDispatcher, int, Object) line: 227 ListenerQueue.dispatchEventSynchronous(int, Object) line: 149 EventAdminImpl.dispatchEvent(Event, boolean) line: 139 EventAdminImpl.sendEvent(Event) line: 78 EventComponent.sendEvent(Event) line: 39 EventBroker.send(String, Object) line: 76 UIEventPublisher.notifyChanged(Notification) line: 58 PartStackImpl(BasicNotifierImpl).eNotify(Notification) line: 380 PartStackImpl(ElementContainerImpl<T>).setSelectedElement(T) line: 165 PartServiceImpl.internalBringToTop(MPart) line: 227 PartServiceImpl.bringToTop(MPart) line: 219 PartServiceImpl.showPart(EPartService$PartState, MPart, MPart) line: 472 PartServiceImpl.showPart(MPart, EPartService$PartState) line: 509 WorkbenchPage.busyOpenEditor(IEditorInput, String, boolean, int, IMemento) line: 1829 WorkbenchPage.access$9(WorkbenchPage, IEditorInput, String, boolean, int, IMemento) line: 1796 WorkbenchPage$5.run() line: 1778 BusyIndicator.showWhile(Display, Runnable) line: 70 WorkbenchPage.openEditor(IEditorInput, String, boolean, int, IMemento) line: 1774 WorkbenchPage.openEditor(IEditorInput, String, boolean, int) line: 1758 WorkbenchPage.openEditor(IEditorInput, String) line: 1741 UntitledTextFileWizard.performFinish() line: 80
PartRenderingEngine's getContext(MElementContainer<MUIElement>) method is bad. When we have a PartSashContainer (the "editor area"), we invoke eContainer() which gives us the window. What we want is the perspective here.
Note that this is still broken as of the latest code delivered today for bug 284610.
Almost certainly the result of the LSR's 'showElementRecursive' setting the 'phContext' to null after a single set. It should instead set a flag to null it once the current set of children has been processed. We're likely only re-parenting the context of the first editor rather than all of them.
Fixed by changes to bug 284610.