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

Bug 193600

Summary: [Commands] org.eclipse.ui.menus/menuContribution locationURI query placement "endof=..." not implemented?
Product: [Eclipse Project] Platform Reporter: Tonny Madsen <tonny.madsen>
Component: UIAssignee: Paul Webster <pwebster>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: prakash
Version: 3.3Keywords: helpwanted
Target Milestone: 3.6 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
endof v01
none
endof v02 none

Description Tonny Madsen CLA 2007-06-20 15:22:14 EDT
Build id: I20070608-1718

According to the specification of org.eclipse.ui.menus/menuContribution/separator, the query placement "endof=..." should be support in the locationURI: see the description of the na,e attribute below.

<!ELEMENT separator EMPTY>
<!ATTLIST separator
  name    CDATA #REQUIRED
  visible (true | false) >

Inserts a separator at the current insertion point.

name - The 'id' of this contribution. If defined then it can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element (or at the end of the logical group containing this element using the 'endOf' value). 
Separator contributions that have an id define the start of a logical group so the result of using the 'endof' value for placement is to search forward in the current menu to locate the next id'd separator and to place the inserted elements before that element. If no trailing separator is found then the items are placed at the end of the menu. 

visible - Indicates whether or not the separator should be visible in the UI. false by default.
Comment 1 Paul Webster CLA 2008-03-20 10:13:57 EDT
This is do-able, but appears to require a rework of how WorkbenchMenuService uses the contribution managers in processAdditions(*)

PW
Comment 2 Paul Webster CLA 2009-10-20 14:05:18 EDT
Created attachment 150011 [details]
endof v01

This is the endof implementation.  Before committing  I need to update the menus.exsd document with the same info as the constant.

PW
Comment 3 Paul Webster CLA 2009-10-20 14:52:50 EDT
Created attachment 150013 [details]
endof v02

Update the schema with a few comments.

PW
Comment 4 Paul Webster CLA 2009-10-20 15:03:06 EDT
Released to HEAD >20091020
PW
Comment 5 Paul Webster CLA 2009-10-27 13:22:17 EDT
In I20091027-0100
PW