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

Bug 436018

Summary: Popup menu contributions to "popup:org.eclipse.ui.popup.any" appear twice
Product: [Eclipse Project] Platform Reporter: Stephan Eberle <stephaneberle9>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: critical    
Priority: P3    
Version: 4.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Screenshot of Project Explorer context menu showing duplicated menu entires none

Description Stephan Eberle CLA 2014-05-28 04:19:50 EDT
Created attachment 243610 [details]
Screenshot of Project Explorer context menu showing duplicated menu entires

Consider the following plugin.xml code:

<plugin>
   <extension
         point="org.eclipse.ui.commands">
      <command
            id="test.command1"
            name="Test command name">
      </command>
   </extension>
   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            locationURI="popup:org.eclipse.ui.popup.any?after=additions">
         <command
               commandId="test.command1"
               label="Test command label"
               style="push">
            <visibleWhen
                  checkEnabled="false">
               <and>
                  <count
                        value="1">
                  </count>
                  <iterate>
                     <instanceof
                           value="org.eclipse.core.resources.IFile">
                     </instanceof>
                  </iterate>
               </and>
            </visibleWhen>
         </command>
      </menuContribution>
   </extension>
   <extension
         point="org.eclipse.ui.handlers">
      <handler
            class="test.TestCommand"
            commandId="test.command1">
      </handler>
   </extension>

</plugin>

When launching a runtime workspace and opening the context menu on any file in the Project explorer, the "Test command label" entry appears twice (see also attached screenshot).

When changing the menuContribution's locationURI to 

"popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu"

the Project Exporer context menu correctly displays just one menu entry.

This is a new issue since Luna RC1.
Comment 1 Paul Webster CLA 2014-05-28 06:21:04 EDT

*** This bug has been marked as a duplicate of bug 435949 ***