[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[News.eclipse.technology.gmf] Re: Is it possible to modify the position of Diagram menu from the main menu bar?

Anyone can help me out? many thanks.

/ tiggo

tiggo wrote:
Hello,

In "org.eclipse.gmf.runtime.diagram.ui.providers", diagram menu was defined as:
/////////////////////////////////////
<extension id="presentationContributionItemProvider" name="%ext.presentationContributionItemProvider" point="org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders">


...
<partContribution class="org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart"> <partMenu menubarPath="/project" id="diagramMenu"/>
/////////////////////////////////////
that is, just after the "project" group marker, it will cause some problem...
If I deploy gmf as RCP, that is, there maybe no "project" group marker. So I have to modify the registed "menupath". Unfortunely, it seems hard to achieve it...
Any idea on it?


also find the previous discussion as below.

regards / tiggo

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