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

Bug 331662

Summary: [Compatibility] Menu ordering is off in 'Variables' view's view menu
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3 CC: pwebster
Version: 4.1   
Target Milestone: 4.2 M2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
CompatibilityView patch v1
none
Menu contributions patch v1 none

Description Remy Suen CLA 2010-12-02 08:16:04 EST
The view menu has 'Java' then 'Layout' when it should be 'Layout' then 'Java'. It seems like we need to turn the view menu's contribution items into opaque model elements, is this correct, Paul?

Trace of the 'Java' menu addition code as follows.

Thread [main] (Suspended)	
	MenuManagerRenderer.addToManager(MenuManager, MMenuElement, IContributionItem) line: 601	
	MenuManagerRenderer.processMenu(MenuManager, MMenu) line: 619	
	MenuManagerRenderer.modelProcessSwitch(MenuManager, MMenuElement) line: 658	
	MenuManagerRenderer.processContents(MElementContainer<MUIElement>) line: 583	
	PartRenderingEngine.createGui(MUIElement, Object, IEclipseContext) line: 508	
	RenderedToolBarRenderer.showMenu(ToolItem) line: 245	
	RenderedToolBarRenderer$2.widgetSelected(SelectionEvent) line: 222	
	TypedListener.handleEvent(Event) line: 234	
	EventTable.sendEvent(Event) line: 84	
	ToolItem(Widget).sendEvent(Event) line: 1053
Comment 1 Remy Suen CLA 2010-12-02 08:45:16 EST
The 'Debug' view is also off. It goes 'View Management...', 'Java', then 'Layout', on 3.x it goes 'Layout', 'View Management...', then 'Java'.
Comment 2 Remy Suen CLA 2010-12-02 08:46:52 EST
Created attachment 184350 [details]
CompatibilityView patch v1

Implements the proposed suggestion in comment 0.
Comment 3 Remy Suen CLA 2011-05-18 13:20:51 EDT
Created attachment 196021 [details]
Menu contributions patch v1

So there are two bugs here.

The first one is the one described in comment 0. The menu goes 'Java' first then 'Layout' when it should be 'Layout' first then 'Java'.

The second problem is that the 'Java' submenu's order is inverted. 'Show Constants' should be the first item there but we have 'Java Preferences...' as the first item in 4.x and 'Show Constants' comes up at the bottom of the list.
Comment 4 Remy Suen CLA 2011-09-09 08:58:02 EDT
(In reply to comment #3)
> Created attachment 196021 [details]
> Menu contributions patch v1

Fix released to R4_development.
http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_development&id=9954a5ef4e59a5d39a1a491f7272446ce76c590a
Comment 5 Remy Suen CLA 2011-09-13 08:22:24 EDT
Verified with I20110912-0200 on Windows XP.
Comment 6 Remy Suen CLA 2011-09-16 12:55:54 EDT
*** Bug 330820 has been marked as a duplicate of this bug. ***