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

Bug 319319

Summary: Window menu lists too many top-level windows
Product: [Eclipse Project] e4 Reporter: Boris Bokowski <bokowski>
Component: UIAssignee: Remy Suen <remy.suen>
Status: RESOLVED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3 CC: remy.suen
Version: 1.0   
Target Milestone: 1.0 RC2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
screenshot none

Description Boris Bokowski CLA 2010-07-08 16:52:33 EDT
see screenshot
Comment 1 Boris Bokowski CLA 2010-07-08 16:53:38 EDT
Created attachment 173813 [details]
screenshot
Comment 2 Remy Suen CLA 2010-07-08 17:53:13 EDT
1. Launch your inner.
2. Window > New Window
3. Bring up the 'Window' menu in the second window.
4. Bring up the 'Window' menu in the first window.
5. Close the second window.
6. Bring up the 'Window' menu in the first window. The extra entries are still there.
Comment 3 Remy Suen CLA 2010-07-09 09:33:19 EDT
SwitchToWindowMenu's fill(Menu, int) is invoked every time the 'Window' menu is opened. However, once you spawn another workbench window, it is never invoked again. This applies to both the original and the new workbench window. Normally, you would see something like the following...

Thread [main] (Suspended (breakpoint at line 88 in SwitchToWindowMenu))	
	SwitchToWindowMenu.fill(Menu, int) line: 88	
	RenderedMenuItemRenderer.fill(IContributionItem, Menu) line: 51	
	RenderedMenuItemRenderer.createWidget(MUIElement, Object) line: 44	
	PartRenderingEngine.createWidget(MUIElement, Object) line: 573	
	PartRenderingEngine.createGui(MUIElement, Object, IEclipseContext) line: 377	
	MenuServiceFilter.render(Menu, MMenu) line: 232	
	MenuServiceFilter.showMenu(Event, Menu, MMenu) line: 157	
	MenuServiceFilter.handleMenu(Event, Menu, MMenu) line: 114	
	MenuServiceFilter.handleEvent(Event) line: 100	
	EventTable.sendEvent(Event) line: 84	
	Display.filterEvent(Event) line: 1253
Comment 4 Remy Suen CLA 2010-07-12 10:22:50 EDT
Fixed in CVS HEAD.