Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Customize the Editor Context Menu?
Customize the Editor Context Menu? [message #153343] Wed, 03 October 2007 17:40 Go to next message
Eclipse UserFriend
Originally posted by: sjames_iberis.hotmail.com

I would like to implement a custom context menu and have the generated
editor use it, rather than standard one.
In particular, I want to make the options available on the menu sensitive
to the content of elements of the semantic model associated with selected
diagram nodes.
For example, I have a node that represents a process which can be in a
started or stopped state. I would like the menu to offer a Start option
only if it is stopped and vice versa.

Can anyone confirm whether it is possible to customize the editor's
context menu to this extent?

I am using Eclipse v3.3.

Thanks.

Simon
Re: Customize the Editor Context Menu? [message #153443 is a reply to message #153343] Thu, 04 October 2007 09:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Simon.James.aepona.com

Actually, I worked this out for myself.
For the record, I used the extension point ...

org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders

... with my own contribution item provider, extending

AbstractContributionItemProvider.

Described in the GMF Developer Guide, under 'Contribution Item Providers
Extension Point'.

http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse. gmf.doc/reference/extension-points/org_eclipse_gmf_runtime_c ommon_ui_services_action_contributionItemProviders.html
Re: Customize the Editor Context Menu? [message #154862 is a reply to message #153343] Thu, 11 October 2007 09:44 Go to previous message
Eclipse UserFriend
Originally posted by: benholtz.gmx.de

Can you make a tutorial? I want to customize the context menu, too. The GMF
tutorial was a little bit to hard for me.

Thx, Benjamin

"Simon James" <sjames_iberis@hotmail.com> wrote in message
news:6cdd2553e9ff4018fe26793089ae9a4d$1@www.eclipse.org...
>I would like to implement a custom context menu and have the generated
>editor use it, rather than standard one.
> In particular, I want to make the options available on the menu sensitive
> to the content of elements of the semantic model associated with selected
> diagram nodes.
> For example, I have a node that represents a process which can be in a
> started or stopped state. I would like the menu to offer a Start option
> only if it is stopped and vice versa.
>
> Can anyone confirm whether it is possible to customize the editor's
> context menu to this extent?
>
> I am using Eclipse v3.3.
>
> Thanks.
>
> Simon
>
Previous Topic:"save as image file" fails
Next Topic:Quick CreateElement question
Goto Forum:
  


Current Time: Mon Jul 14 04:02:43 EDT 2025

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

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

Back to the top