Community
Participate
Working Groups
When a model fragment specifies a position relative to some other item, any new model fragments extending an item inside it won't show up. I have plugin for an RCP application which adds a menu to the main menu bar. Since we want this menu to appear between a bunch of other menus already present in the application model, we specify a position in list for the menu's model fragment like this: Extended Element ID * | menu:org.eclipse.ui.main.menu Feature Name * | children Position in list | after:com.company.application.gui.menu.othermenu In this model fragment, we define a single Menu like this: ID | com.company.ourplugin.gui.menu.ourmenu Label | Our Menu So far everything works as expected, the "Our Menu" menu appears after the "Other Menu" menu on the menu bar and all items defined in the same model fragment are visible. However, I've created a second plugin in which I want to add a submenu to "Our Menu", creating a model fragment as following: Extended Element ID * | com.company.ourplugin.gui.menu.ourmenu Feature Name * | children Position in list | ... with a single Menu like this: ID | com.company.myplugin.gui.menu.mysubmenu Label | My Submenu When I start the application with this plugin included, "My Submenu" doesn't appear in "Our Menu". However, if I empty the "Position in list field" of the model fragment containing "Our Menu", "My Submenu" appears as it should. The same applies if I use an absolute position, such as "first" or "index:". Further experimentation shows the problem does not depend on having separate plugins, as it persisted even if I extended the model fragment containing "My Submenu" into the fragment.e4xmi file containing "Our Menu" (without merging the model fragments). Neither is it restricted to top level menus, as the same happens if I make "Our Menu" a submenu of some other menu (and give it a position relative some other item in it).
Bug still exists in Eclipse 4.7.2 Furthermore, the fact that fragment extension worked with absolute positions seems to have been a fluke, because when we continued developing our application, the extending menu parts stopped working altogether. Now we can't make "My Submenu" appear in "Our Menu" at all. I have updated the summary and the version.