| Summary: | Part cannot be activated after detaching it, closing it, and resetting the perspective | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Stefan Mücke <s.muecke> | ||||||
| Component: | UI | Assignee: | Eric Moffatt <emoffatt> | ||||||
| Status: | RESOLVED WORKSFORME | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | bokowski | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
This scenario now seems to work (using HEAD). This time the Package Explorer was activated, but when I tried to activate another view I got an exception: !ENTRY org.eclipse.e4.ui.workbench 4 0 2010-07-16 15:35:22.061 !MESSAGE Internal Error !STACK 0 org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:54) at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:74) at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:90) at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:333) at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:350) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:398) at org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer.activate(AbstractPartRenderer.java:105) ... at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1424) at org.eclipse.swt.widgets.Shell.WM_MOUSEACTIVATE(Shell.java:2297) Caused by: java.lang.NullPointerException at org.eclipse.ui.part.PageBookView$4.partDeactivated(PageBookView.java:1047) at org.eclipse.ui.internal.WorkbenchPage.firePartDeactivated(WorkbenchPage.java:2802) at org.eclipse.ui.internal.WorkbenchPage.access$12(WorkbenchPage.java:2791) at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partDeactivated(WorkbenchPage.java:131) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartDeactivated(PartServiceImpl.java:190) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.setPart(PartServiceImpl.java:142) at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:47) ... 94 more Stefan, did you encounter this during testing with the patch from bug 319961? Yes. I will check if this is caused by the patch from bug 319961. Eric, could you have a look at the patch form bug 319961? One part of that patch is that as the perspective layout is built (ModeledPageLayout etc), I am removing views from the model if I can find them, using code like: MUIElement existingView = layout.findElement(layout.perspModel, viewId); if (existingView instanceof MPlaceholder) { existingView.getParent().getChildren().remove(existingView); } Could it be that layout.findElement(perspModel, viewId) does not find a view if it is detached? In both cases there is a bug; however there are different bugs and exceptions. Without the patch, the Package Explorer will be activated, but it will not be possible to activate another view. With the patch, the Package Explorer will NOT be activated, but trying to activate it results in the behavior described in comment 0. Created attachment 174504 [details]
Remove the close button from the shell
Many of these issues are the result of closing the *shell* using the red 'x' rather than closing the view itself. For now we'll just wire off the 'x'...
The patch also contains some code to safe up the shared TB story...was getting some widget disposed errors when testing after making the fix.
Committed in >20100716. Applied the patch. *** Bug 320096 has been marked as a duplicate of this bug. *** Reopening because the fox for Bug 333496 caused the red 'x' to re-appear... Created attachment 193262 [details]
Patch to explicitly remove the Close button from detached windows
Committed in >20110414. Applied the patch. Note that I'm still getting an odd error when closing a view in a DW: org.eclipse.core.runtime.AssertionFailedException: assertion failed: The widget should not have been disposed at this point at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart$1.handleEvent(CompatibilityPart.java:83) at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:179) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4678) at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:182) I'm still looking at this but at least you can re-open the part and there are no apparent side-effects... Removing outdated target milestone. All of these behaviors have been address by subsequent work on the DW management... |
1. Open a fresh e4 workbench 2. Detach the Package Explorer view by dragging it off the workbench 3. Close the detached stack 4. Reset the perspective RESULT (1): Package Explorer is not activated 5. Try to activate the Package Explorer RESULT (2): Not possible. 6. Try to close the Package Explorer RESULT (3): Error dialog: Internal Error; NPE !ENTRY org.eclipse.e4.ui.workbench 4 0 2010-07-16 14:38:56.549 !MESSAGE Internal Error !STACK 0 java.lang.NullPointerException at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer$4.close (StackRenderer.java:442) at org.eclipse.e4.ui.widgets.CTabFolder.onMouse(CTabFolder.java:1620) at org.eclipse.e4.ui.widgets.CTabFolder$1.handleEvent(CTabFolder.java:265) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) ...