How to contribute a new command into a sub-context menu? [message #492900] |
Thu, 22 October 2009 05:56  |
Eclipse User |
|
|
|
Originally posted by: formatzeh.gmx.de
I have two plugins. In the first I declared a command with a parameter
and some menu contributions for that command in the context menu of a
generated EMF editor. The schema looks like this:
<extension point="org.eclipse.ui.commands">
<command
defaultHandler="my.TransformationHandler"
id="my.command.transform"
name="CRUISeTransform">
<commandParameter
id="my.command.transform.param"
name="Transformation File"
optional="false"
typeId="my.converter.id.URI">
</commandParameter>
</command>
<commandParameterType
converter="my.URIConverter"
id="my.converter.id.URI"
type="org.eclipse.emf.common.util.URI">
</commandParameterType>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:my.generated.MetaModelEditorID?before=additions ">
<menu
label="My Transformations">
<command
commandId="my.command.transform"
label="Generate Something"
style="push">
<parameter
name="my.command.transform.param"
value="theValue">
</parameter>
</command>
</menu>
</menuContribution>
</extension>
And the second plugin: Here I want to add a new entry in the sub-context
menu which was contributed in the first plugin. But the problem I see is
the following. When adding a new menuContribution to
org.eclipse.ui.menus I only can specify the locationURI of the parent
context menu, isn't it? That means in this case I only can a new
contribution to "popup:my.generated.MetaModelEditorID" but not to the
first created sub-context menu named "My Transformations". Am I
understandable and can you help me?
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03973 seconds