| Summary: | StackRenderer arbitrarily changes selected element when MPartStack is being unrendered | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Remy Suen <remy.suen> | ||||
| Component: | UI | Assignee: | Remy Suen <remy.suen> | ||||
| Status: | VERIFIED FIXED | QA Contact: | Eric Moffatt <emoffatt> | ||||
| Severity: | major | ||||||
| Priority: | P3 | ||||||
| Version: | 1.0 | ||||||
| Target Milestone: | 4.1 M3 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Remy Suen
The renderer is changing the selection on shutdown. Thread [main] (Suspended (breakpoint at line 158 in ElementContainerImpl)) PartStackImpl(ElementContainerImpl<T>).setSelectedElement(T) line: 158 StackRenderer.hideChild(MElementContainer<MUIElement>, MUIElement) line: 414 PartRenderingEngine.removeGui(MUIElement) line: 517 PartRenderingEngine.removeGui(MUIElement) line: 528 PartRenderingEngine.removeGui(MUIElement) line: 528 ElementReferenceRenderer.disposeWidget(MUIElement) line: 110 PartRenderingEngine.removeGui(MUIElement) line: 532 PartRenderingEngine.removeGui(MUIElement) line: 528 PartRenderingEngine.removeGui(MUIElement) line: 528 PartRenderingEngine.removeGui(MUIElement) line: 528 PartRenderingEngine.removeGui(MUIElement) line: 528 PartRenderingEngine.removeGui(MUIElement) line: 528 WorkbenchWindow.hardClose(boolean) line: 1355 WorkbenchWindow.busyClose(boolean) line: 1059 WorkbenchWindow.access$9(WorkbenchWindow, boolean) line: 1038 WorkbenchWindow$6.run() line: 1085 BusyIndicator.showWhile(Display, Runnable) line: 70 WorkbenchWindow.close(boolean) line: 1083 Workbench$14.run() line: 1048 SafeRunner.run(ISafeRunnable) line: 42 Workbench.busyClose(boolean) line: 1042 Workbench.access$11(Workbench, boolean) line: 956 Workbench$15.run() line: 1118 BusyIndicator.showWhile(Display, Runnable) line: 70 Workbench.close(int, boolean) line: 1116 Workbench.close() line: 1089 WorkbenchWindow.busyClose(boolean) line: 1056 WorkbenchWindow.access$9(WorkbenchWindow, boolean) line: 1038 WorkbenchWindow$6.run() line: 1085 BusyIndicator.showWhile(Display, Runnable) line: 70 WorkbenchWindow.close(boolean) line: 1083 WorkbenchWindow.close() line: 1099 WorkbenchWindow$4.close(MWindow) line: 427 WBWRenderer$8.shellClosed(ShellEvent) line: 421 Remy, is this another one of those cases where it's the StackRenderer 'adjusting' its selected element automatically? If so then perhaps it's time to turf that code and ensure that whenever *we* (the workbench) closes a part that *it* picks another element in the stack to become 'selected' ?? (In reply to comment #2) > Remy, is this another one of those cases where it's the StackRenderer > 'adjusting' its selected element automatically? Yes, it is. (In reply to comment #2) > If so then perhaps it's time to > turf that code and ensure that whenever *we* (the workbench) closes a part that > *it* picks another element in the stack to become 'selected' ?? Note that the CTabFolder will automatically select another item if you dispose the currently selected item. *** Bug 326688 has been marked as a duplicate of this bug. *** Created attachment 179976 [details]
PartRenderingEngineTests tests patch v1
The incorrect placeholder referencing problem described by bug 326688 can lead to some fun duplication of views. 1. Window > Reset Perspective... > OK 2. Drag the 'Problems' view and drop it somewhere. 3. Now you have two 'Problems' view. (In reply to comment #2) > If so then perhaps it's time to > turf that code and ensure that whenever *we* (the workbench) closes a part that > *it* picks another element in the stack to become 'selected' ?? Based on the other problems that are cropping up due to this issue, I agree that we should just go ahead with this, Eric. The renderers shouldn't try to be smart unless they have to anyway. Fixed in CVS HEAD. Verified on Windows XP with I20101025-1602. The active part does not appear to be preserved though, see bug 328703. |