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

Bug 324160

Summary: [Commands] Platform should support to use the action IDs from the action set contribution in menuContribution
Product: [Eclipse Project] Platform Reporter: Deepak Azad <deepakazad>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED WONTFIX QA Contact: Paul Webster <pwebster>
Severity: normal    
Priority: P3 CC: daniel_megert, markus.kell.r, prakash, remy.suen
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Deepak Azad CLA 2010-09-01 00:08:25 EDT
I20100831-1001

We want to add a new menu contribution to the Navigate menu just below 'Open Super Implementation' action (bug 48880).

The command is defined as 
     <command
            categoryId="org.eclipse.ui.category.navigate"
            description="New command"
            id="org.eclipse.jdt.ui.command.NewCommand"
            name="New Command">
      </command>

and the menu contribution is

   <extension 
         point="org.eclipse.ui.menus">
       <menuContribution
            locationURI="menu:navigate?after=org.eclipse.jdt.ui.edit.text.java.open.super.implementation">
        <command
          commandId="org.eclipse.jdt.ui.command.NewCommand"
          style="push">
        </command>
       </menuContribution>
   </extension>

Here the menu contribution does not work at all - the contribution is not even added to the menu. The command in the after clause - 'org.eclipse.jdt.ui.edit.text.java.open.super.implementation' - is added to the menu using an actionSet from o.e.jdt.ui. Platform should support to use the action IDs from the action set contribution in menuContribution.
Comment 1 Dani Megert CLA 2010-09-01 02:32:58 EDT
I agree. The current situation makes it impossible to adopt the new story step by step: the whole menu group has to be converted and that's often not possible because the group itself is in another plug-in (as can be seen in bug 48880).

Instead of having direct support for the command ID I could also live with a probably simpler to implement approach where I can specify the action ID used in the action set.
Comment 2 Paul Webster CLA 2010-09-07 07:37:45 EDT
It is designed so that menuContributions cannot see legacy action extension points.  i.e. Programmatic actions are applied, then menuContributions, then legacy action extensions.  The legacy action extension couldn't interact gracefully with each other, never mind a new paradigm.

The current "hybrid" story: The menus and separators used in actionSets can be defined in menuContributions, and then they can be seen from both other menuContributions and from actionSets.

PW