Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » E4 Compatibility Layer Menu Ordering Issues.(Menu ordering under the Eclipse 4 compatibility layer is different than Eclipse 3)
E4 Compatibility Layer Menu Ordering Issues. [message #1237850] Thu, 30 January 2014 19:22 Go to next message
Dave Dresser is currently offline Dave DresserFriend
Messages: 10
Registered: April 2010
Junior Member
Building our RCP application (developed under 3.x) on the 4.x platform has produced two issues regarding the ordering of our menus. First we have a menu contribution to the main menu which is placed in a different position under Eclipse 4.x as under 3.x. Second our contributions to the Help Menu also get placed differently. Screen shots showing the differences are attached.

Regarding the first issue, the two menus contributed to the main menu are Configure and Example. The main plugin.xml (project com.example.rcp.workbench) defines a menu contribution to the org.eclipse.ui.menus extension point.
A second plugin (project com.example.rcp.workbench.menu) adds the the Configure and Example menus also using the same extension point and placed with a locationURI. They are contributed from a separate plugin because we have some configurations where these menus are used and others where they aren't.

Regarding the second issue, the differences in help menu ordering are due to our menus placed differently with respect to p2 contributed menus.

A sample set of projects demonstrating the issue is attached in ide-e4.zip. To view the sample:

  1. Unzip to a working folder
  2. Open Eclipse using the working folder/ide-e4 as the workspace (was built with Kepler Std SR1).
  3. Import existing projects into workspace
  4. I've been testing with the com.example.rcp.parent/example2.target which is setup to use the eclipse platform as the target platform
  5. There is a launch configuration in com.example.rcp.workbench.product/LaunchConfigurations

To clean up the interface a bit we've added cssTheme, applicationCSSResources and applicationXMI properties to the main plugin.xml.

I haven't found this issue documented in either this forum or bugzilla. We are also seeing a couple of the issues documented in this discussion, http://www.eclipse.org/forums/index.php/m/1230926/?srch=compatibility#msg_1230926.

Has anyone else seen this issue?

Am I missing something or should I open a new bug regarding this?

plugin.xml segment from main plugin:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>

   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            allPopups="false"
            locationURI="menu:org.eclipse.ui.main.menu">
         <menu
               id="file"
            ...
         </menu>
         <menu
               id="edit"
            ...
         </menu>
            ...
         <separator
               name="additions"
               visible="false">
         </separator>
         <menu
               id="window"
            ...
         </menu>
         <menu
               id="help"
            ...
            <command
                  commandId="org.eclipse.ui.help.dynamicHelp"
                  id="dynamicHelp"
                  label="Dynamic Help"
                  style="push">
            </command>
            <separator
                  name="additions"
                  visible="true">
            </separator>
            ...
            <command
                  commandId="com.example.rcp.workbench.support.command"
                  id="exampleSupport"
                  label="Example Support"
                  style="push">
            </command>
            <command
                  commandId="org.eclipse.ui.help.aboutAction"
                  id="aboutExampleWorkbench"
                  label="About Example Workbench"
                  style="push">
            </command>
         </menu>
      </menuContribution>
      <menuContribution
            allPopups="false"
            locationURI="toolbar:org.eclipse.ui.main.toolbar">
         <separator
               name="additions">
         </separator>
      </menuContribution>
   </extension>
   <extension
         point="org.eclipse.ui.commands">
      <category
            id="com.example.rcp.workbench.commands.category"
            name="Example Workbench Commands">
      </category>
      <command
            categoryId="com.example.rcp.workbench.commands.category"
            defaultHandler="com.example.rcp.workbench.internal.handlers.ExampleSupportHandler"
            id="com.example.rcp.workbench.support.command"
            name="Example Support">
      </command>
   </extension>
   <extension
         id="com.example.rcp.workbench.application"
         point="org.eclipse.core.runtime.applications">
      <application
            visible="true">
         <run
               class="com.example.rcp.workbench.internal.Application">
         </run>
      </application>
   </extension>
   <extension
         id="com.example.rcp.workbench.product"
         point="org.eclipse.core.runtime.products">
      <product
            application="com.example.rcp.workbench.application"
            name="Example Workbench">
         <property
               name="appName"
               value="Example Workbench">
         </property>
         <property
               name="aboutText"
               value="About Example Workbench">
         </property>
            ...
         <property
    		name="cssTheme"
    		value="org.eclipse.e4.ui.css.theme.e4_classic">
		</property>
		<property
    		name="applicationCSSResources"
    		value="platform:/plugin/org.eclipse.platform/images/">
		</property>
		<property
      		name="applicationXMI"
      		value="org.eclipse.platform/LegacyIDE.e4xmi">
   		</property>
      </product>
   </extension>
            ...
</plugin>


Plugin.xml segment from secondary menu contribution plugin:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            allPopups="false"
            locationURI="menu:org.eclipse.ui.main.menu?after=additions">
         <menu
               id="configure"
               label="Configure">
            ...
         </menu>
         <menu
               id="example"
               label="Example">
            <separator
                  name="exampleexplorer"
                  visible="false">
            </separator>
         </menu>
      </menuContribution>
   </extension>
</plugin>
Re: E4 Compatibility Layer Menu Ordering Issues. [message #1412029 is a reply to message #1237850] Mon, 25 August 2014 05:43 Go to previous messageGo to next message
Bill McLaren is currently offline Bill McLarenFriend
Messages: 4
Registered: May 2014
Junior Member
I just bumped into the same issue. Did you file a bug?

BTW, thanks for the excellent example. I learned a few things about Tycho that I was looking for.

-Bill
Re: E4 Compatibility Layer Menu Ordering Issues. [message #1415757 is a reply to message #1412029] Wed, 03 September 2014 14:29 Go to previous message
Dave Dresser is currently offline Dave DresserFriend
Messages: 10
Registered: April 2010
Junior Member
A toolbar alignment problem has been reported in Bug 422651.

Regarding the menu ordering see Bug 385565. I added some comments and a preliminary version of a workaround that we used because our code has to be based on 4.2.2 and the Eclipse fixes were being applied to Luna.
Previous Topic:Logging on Mac OS
Next Topic:Abandoning E4
Goto Forum:
  


Current Time: Wed Apr 24 21:03:53 GMT 2024

Powered by FUDForum. Page generated in 0.02844 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top