Community
Participate
Working Groups
In http://www.eclipse.org/forums/index.php/t/441695/ I posted the question wether it is possible to set a MenuContribution on multiple menus via providing multiple parentIds. After some research I found no evidence that this is possible. If this is really the case then IMHO this is a missing feature. If for example I want to provide the same subset of menuitems within two different menu items (covering e.g. aspects of user-management add/remove/edit) I have to add two MenuContribution items with different parentIds. The ideal case would be to manage only one contribution allowing it to be hooked to n menus.
The pattern for using MenuContributions as they are now is to group your content in one MenuContribution and insert the MMenu with the same id in your 2 locations. It doesn't work between popup and regular menu, however, as those are different schemes. One of the things I'm considering (although I doubt it will be in 4.3) is to allow model fragments to 1) be more dynamic in nature and 2) specify them using XPath. Then specifying specific locations or multiple parent IDs would be possible. PW
Paul, thank you, I understand. This however forces me to introduce menus in the original model instead of linking to already existing menu items. I do not understand the approach you mention in 1 or 2, but if you go for a specific way, tell me if i can help!
Created attachment 224969 [details] emf xpath integration Part 1 would be to look at model fragment processing. For the existing model, apply fragments at all locations that match their insertion point. Then for any new additions to the model, be able to evaluate them as well. Part 2 would be to allow insertion points expressed as XPath. See this project set file for the 2 bundles that supply EMF-XPath integration. XPath would be able to specify insertion points more precisely. PW
Does this still stand as an enhancement request (Requiring the MC to have multiple parents)? I'm supposing no but feel free to repoen.
For consideration with bug 324954 PW