tags:

views:

75

answers:

1

If I add action within an extension point thus:

    <action
           class="com.mycompany.MyAction"
           id="mycompany.myaction.MyAction"
           menubarPath="actions"
    />

How can I control its ordering programatically? It looks like they are simply ordered alphabetically according to their ID. I don't want to have to give them names such as '001-z', '002-a', just to get 'z' to appear before 'a'. It would also be a nightmare re-ordering them later.

A: 

You should not use actions for the menu. Try commands instead. See here: http://www.vogella.de/articles/RichClientPlatform/article.html#commands_menu

If you want to order them use: ?after=....

 <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            locationURI="menu:org.eclipse.ui.main.menu?after=fileMenu">
         <menu
               id="myMenu"
....
Raven

related questions