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

Bug 367823

Summary: Pulldown menu don't work with Eclipse 4.2
Product: [Eclipse Project] Platform Reporter: Vincent Lorenzo <vincent.lorenzo>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: pwebster, remy.suen
Version: 4.2   
Target Milestone: 4.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 366037    
Attachments:
Description Flags
This plugin provides an example of the problem none

Description Vincent Lorenzo CLA 2012-01-04 05:14:33 EST
I declared pulldown menu for the toolbar in the plugin.xml, but it doesn't work with Juno 4.2 (work fine with Indigo and 3.8). 
The main menu appears in the toolbar, but without the down arrow and the actions which provides.

Firstly, I declare the toolbar and the pulldown menu
<menuContribution
         locationURI="toolbar:org.eclipse.ui.main.toolbar?after=org.eclipse.papyrus.uml.diagram.ui.toolbar">
      <toolbar
            id="org.eclipes.papyrus.menu.toolbar"
            label="Papyrus Toolbar Action">
         <command
               commandId="org.eclipse.papyrus.uml.diagram.menu.toolbar.command"
               icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui.actions/icons/elcl16/line_style_group.gif"
               id="org.eclipse.papyrus.menu.line.style.toolbar.command"
               style="pulldown"
               tooltip="Line Style Action">
            <visibleWhen>
               <and>
                  <with
                        variable="activeEditorId">
                     <equals
                           value="org.eclipse.papyrus.infra.core.papyrusEditor">
                     </equals>
                  </with>
               </and>
            </visibleWhen>
         </command>
 	</toolbar>
   </menuContribution>
   
Secondly, I declare the actions for the pulldown menu

   <extension
      point="org.eclipse.ui.menus">
   <menuContribution
         locationURI="menu:org.eclipse.papyrus.menu.line.style.toolbar.command">
      <command
            commandId="org.eclipse.papyrus.uml.diagram.menu.commands.line.style.rectilinear"
            icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui.actions/icons/elcl16/rectilinear.gif"
            id="org.eclipse.papyrus.menu.line.style.toolbar.rectilinear"
            label="&amp;Rectilinear Style Routing"
            style="toggle"
            tooltip="Change routing to rectilinear style for connectors">
      </command>
      <command
            commandId="org.eclipse.papyrus.uml.diagram.menu.commands.line.style.oblique"
            icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui.actions/icons/elcl16/oblique.gif"
            id="org.eclipse.papyrus.menu.line.style.toolbar.oblique"
            label="&amp;Oblique Style Routing"
            style="toggle"
            tooltip="Change routing to oblique style for connectors">
      </command>
      <command
            commandId="org.eclipse.papyrus.uml.diagram.menu.commands.line.style.tree"
            icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui.actions/icons/elcl16/tree.gif"
            id="org.eclipse.papyrus.menu.line.style.toolbar.tree"
            label="&amp;Tree Style Routing"
            style="toggle"
            tooltip="Change routing to tree style for connectors">
      </command>
      <separator
            name="org.eclipse.papyrus.menu.line.style.toolbar.separator0"
            visible="true">
      </separator>
      <command
            commandId="org.eclipse.papyrus.uml.diagram.menu.commands.line.style.removebendpoint"
            icon="icons/no_bendpoints.gif"
            id="org.eclipse.papyrus.menu.line.style.toolbar.no.bendpoint"
            label="Remove &amp;all bendpoints"
            style="push"
            tooltip="Remove all bendpoints on the selected connectors">
      </command>
   </menuContribution>
</extension>
Comment 1 Vincent Lorenzo CLA 2012-01-04 08:40:58 EST
Created attachment 209001 [details]
This plugin provides an example of the problem

This plugin provides an example of the problem. It works fine on Indigo 3.7 but not on Eclipse 4.2.
Comment 2 Paul Webster CLA 2012-01-16 13:25:01 EST
Possibly related to the fix for bug 367159

PW
Comment 3 Paul Webster CLA 2012-01-17 08:26:07 EST

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