Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327807

Summary: CTabItem disposal causes change in an MPartStack's selectedElement
Product: [Eclipse Project] e4 Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Eric Moffatt <emoffatt>
Severity: normal    
Priority: P3    
Version: 1.0   
Target Milestone: 4.1 M3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Ignore CTF selection events during 'hideChild'
none
PartRenderingEngineTests tests patch v1 none

Description Remy Suen CLA 2010-10-14 13:40:03 EDT
Thread [main] (Suspended)	
	StackRenderer.showTab(MUIElement) line: 497	
	LazyStackRenderer$1.handleEvent(Event) line: 73	
	UIEventHandler.handleEvent(Event) line: 41	
	EventHandlerWrapper.handleEvent(Event, Permission) line: 188	
	EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 198	
	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: 139	
	EventAdminImpl.sendEvent(Event) line: 78	
	EventComponent.sendEvent(Event) line: 39	
	EventBroker.send(String, Object) line: 73	
	UIEventPublisher.notifyChanged(Notification) line: 58	
	PartStackImpl(BasicNotifierImpl).eNotify(Notification) line: 380	
	PartStackImpl(ElementContainerImpl<T>).setSelectedElement(T) line: 159	
	StackRenderer$3.widgetSelected(SelectionEvent) line: 436	
	TypedListener.handleEvent(Event) line: 234	
	EventTable.sendEvent(Event) line: 84	
	CTabFolder(Widget).sendEvent(Event) line: 1053	
	CTabFolder(Widget).sendEvent(int, Event, boolean) line: 1077	
	CTabFolder(Widget).sendEvent(int, Event) line: 1062	
	CTabFolder(Widget).notifyListeners(int, Event) line: 774	
	CTabFolder.setSelection(int, boolean) line: 2830	
	CTabFolder.destroyItem(CTabItem) line: 519	
	CTabItem.dispose() line: 126	
	StackRenderer.hideChild(MElementContainer<MUIElement>, MUIElement) line: 395	
	PartRenderingEngine.removeGui(MUIElement) line: 573	
	PartRenderingEngine.removeGui(MUIElement) line: 584	
	PartRenderingEngine.removeGui(MUIElement) line: 584	
	PartRenderingEngine.removeGui(MUIElement) line: 584	
	PartRenderingEngine.removeGui(MUIElement) line: 584	
	PartRenderingEngine.removeGui(MUIElement) line: 584	
	WorkbenchWindow.hardClose(boolean) line: 1356	
	WorkbenchWindow.busyClose(boolean) line: 1058	
	WorkbenchWindow.access$9(WorkbenchWindow, boolean) line: 1037	
	WorkbenchWindow$6.run() line: 1084	
	BusyIndicator.showWhile(Display, Runnable) line: 70	
	WorkbenchWindow.close(boolean) line: 1082	
	Workbench$14.run() line: 1047	
	SafeRunner.run(ISafeRunnable) line: 42	
	Workbench.busyClose(boolean) line: 1041	
	Workbench.access$11(Workbench, boolean) line: 955	
	Workbench$15.run() line: 1121	
	BusyIndicator.showWhile(Display, Runnable) line: 70	
	Workbench.close(int, boolean) line: 1119	
	Workbench.close() line: 1092	
	WorkbenchWindow.busyClose(boolean) line: 1055	
	WorkbenchWindow.access$9(WorkbenchWindow, boolean) line: 1037	
	WorkbenchWindow$6.run() line: 1084	
	BusyIndicator.showWhile(Display, Runnable) line: 70	
	WorkbenchWindow.close(boolean) line: 1082	
	WorkbenchWindow.close() line: 1098	
	WorkbenchWindow$4.close(MWindow) line: 426	
	WBWRenderer$8.shellClosed(ShellEvent) line: 419
Comment 1 Remy Suen CLA 2010-10-14 14:16:45 EDT
Reproducible on I20101007-1949.
Comment 2 Remy Suen CLA 2010-10-14 21:33:53 EDT
Cannot reproduce on I20100930-1946.
Comment 3 Remy Suen CLA 2010-10-15 08:12:12 EDT
(In reply to comment #2)
> Cannot reproduce on I20100930-1946.

Never mind. It was broken there too. It's just that it auto-selected the first item so it seems as if nothing is wrong with your stack if you had shutdown with your first element. This is now "more visible" due to the fix for bug 326087.
Comment 4 Eric Moffatt CLA 2010-10-15 09:27:41 EDT
Created attachment 180954 [details]
Ignore CTF selection events during 'hideChild'
Comment 5 Remy Suen CLA 2010-10-15 11:14:54 EDT
Created attachment 180968 [details]
PartRenderingEngineTests tests patch v1

Tests to reproduce the problem.
Comment 6 Remy Suen CLA 2010-10-15 11:15:28 EDT
Comment on attachment 180954 [details]
Ignore CTF selection events during 'hideChild'

This patch causes test failures and is obsoleted by the fix for bug 326699.
Comment 7 Remy Suen CLA 2010-10-15 11:17:05 EDT
(In reply to comment #5)
> Created an attachment (id=180968) [details]
> PartRenderingEngineTests tests patch v1

Released the tests to HEAD. No fixes required as per comment 6, the fix for bug 326699 has fixed this problem also.
Comment 8 Remy Suen CLA 2010-10-26 13:12:40 EDT
Selection is now preserved for part stacks across workbench restarts.

Verified on Windows XP with I20101025-1602.