Am 30.08.2011 16:14, schrieb Remy Suen:
Both MToolItems and MMenus are model elements. The MToolItem's
'menu' feature is defined in the model so you can just add it in
your e4xmi. Is that not working for you?
Currently I do contribute all HandledToolItems directly to
'toolbar:org.eclipse.ui.main.toolbar'. I do not know what
contributions are allowed.
This is an excerpt from my fragment.e4xmi file.
<snippet>
...
<fragments xsi:type="fragment:StringModelFragment"
xmi:id="_U3cDULOhEeCjau1PwZK1gw" featurename="children"
parentElementId="toolbar:org.eclipse.ui.main.toolbar">
<elements xsi:type="menu:HandledToolItem"
xmi:id="_ZSUjEMgBEeCUE9dML-Xh3A"
elementId="de.wiese24.billingE4.toolitem.lockmerchant"
toBeRendered="false" visible="false" label="Sperren"
iconURI="platform:/plugin/de.wiese24.billingE4/src/images/icon_thumb_down.gif"
tooltip="Merchant sperren" enabled="false"
command="_8eJJ4Mf8EeCUE9dML-Xh3A"/>
<elements xsi:type="menu:HandledToolItem"
xmi:id="_JC2owMjbEeCFDeKa0VeUQw"
elementId="de.wiese24.billingE4.toolitem.setreviser"
label="Bearbeiter"
iconURI="platform:/plugin/de.wiese24.billingE4/src/images/members.gif"
tooltip="Bearbeiter setzen" enabled="false"
command="_93NPsMjaEeCFDeKa0VeUQw"/>
</fragments>
<!-- Is that allowed here ? -->
<elements xsi:type="menu:Menu"
xmi:id="_WftWYNMWEeC5q_H-NgTNZA" .... />
...
</snippet>
Do I have to add a separate String Model Fragment. I tried to
declare a separate String Model Fragment to contribute to a
HandledToolItem itself declared in the fragment, but the Dialog only
shows parent element ids from other plugins...
Honestly, I have no idea :-(
|