Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Is it possible to modify the position of Diagram menu on main menu bar?
Is it possible to modify the position of Diagram menu on main menu bar? [message #2718] Thu, 03 August 2006 02:15 Go to next message
Eclipse UserFriend
Originally posted by: tiggo.kan.gmail.com

// copy from old newsgroup
Hello,

The default "menu path" is "/project", it will cause a problem when
deploy to RCP, where may NO "/project" group marker on menu bar.

Below is something I found in rumtime diagram module, just FYI:
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.contributi onItemProviders ">
...
<partContribution
class=" org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPa rt ">
<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 "menu path". 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@protos.de> wrote in message
> news:dknb73$fb4$1@news.eclipse.org...
>> 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@protos.de
>
>
Re: Is it possible to modify the position of Diagram menu on main menu bar? [message #6361 is a reply to message #2718] Thu, 03 August 2006 13:41 Go to previous messageGo to next message
Eclipse UserFriend
Oops, I lost track of which newsgroup I was reading when I replied to
this earlier. Here's what I meant to say here...


Hi Tiggo,

I would have expected the diagram menu to show up in the "additions"
part of the menu if the "project" group marker can't be found. Is that
not the case?

Regards,
Linda
Re: Is it possible to modify the position of Diagram menu on main menu bar? [message #6379 is a reply to message #6361] Thu, 03 August 2006 21:51 Go to previous message
Eclipse UserFriend
Originally posted by: tiggo.kan.gmail.com

Hi Linda,

If I want to specify the "menu path", such as "/edit", possible?

btw, I have tried a workaround, by adding "/project" group mark after
"edit" menu when configure the RCP workbench. Strangely, it have
problem; diagram menu will dispeared, when open another diagram editor
(I have two types of editor), though it's OK on the first diagram editor.

regards / tiggo

Linda Damus wrote:
> Oops, I lost track of which newsgroup I was reading when I replied to
> this earlier. Here's what I meant to say here...
>
>
> Hi Tiggo,
>
> I would have expected the diagram menu to show up in the "additions"
> part of the menu if the "project" group marker can't be found. Is that
> not the case?
>
> Regards,
> Linda
Previous Topic:problem with synchronizing model changes in different Editor
Next Topic:Re: Semantical container != Graphical container
Goto Forum:
  


Current Time: Thu Apr 24 23:23:07 EDT 2025

Powered by FUDForum. Page generated in 0.03000 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top