Cherie Mahoney wrote:
Henrik,
You can contribute an action to this menu using the Contribution Item
Service or the org.eclipse.ui.editorActions extension point (in
theory, but
I've never tested it). The Contribution Item Service is GMF's way of
extending the Eclipse menu support to provide additional behavior we
wanted
(e.g. menu item hiding). GMF contributes to the Diagram menu using the
Contribution Item Service, but you should be able to use either mechanism
(although menu ordering may be tricky). Maybe someday the
Contribution Item
Serice enhancements will be merged into the Eclipse menu support so
you may
want to stick with the Eclipse menu extension mechanism if that is
what you
are currently using and if provides you with the behavior you want.
The menu id is "diagramMenu". It is defined in
org.eclipse.gmf.runtime.diagram.ui.providers\plugin.xml. You won't be
able
to rename it, but you could add your own menu to the main menu bar.
For an example of using the ContributionItemService see the GMF Logic
Example. It does not contribute to the main diagram menu though.
Look in
org.eclipse.gmf.runtime.diagram.ui.providers\plugin.xml for an example of
this.
e.g. <partAction menubarPath="/diagramMenu/sizeGroup"
toolbarPath="/toolbarFormatGroup" id="autoSizeAction"></partAction>
- Cherie
"Henrik Rentz-Reichert" <hrr@xxxxxxxxx> wrote in message
news:dknb73$fb4$1@xxxxxxxxxxxxxxxxxxx
Hi,
how can I make contributions to the Diagram menu from the main menu bar?
Is it possible to change the name of this menu?
Thanks,
Henrik
--
..............................................
Henrik Rentz-Reichert mailto://hrr@xxxxxxxxx