Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Add a context menu
Add a context menu [message #533634] Fri, 14 May 2010 20:11 Go to next message
Asma is currently offline AsmaFriend
Messages: 41
Registered: February 2010
I want to add a context menu to a figure of my project so that when i right
click on this figure, i can add a new label.
Well, my figure is a composite one. In reality it's a UML Class in which i
added an ellipse at the bottom. And, i want to add the context menu to this
I tried to follow the tutoriel of the addition of the pop-up menu (tutoriel
part 3: custom Actions) but i didn't had any result. The menu i tried to add
was even not shown. I find only standard menu.
I know tht i need to add an extension point to the plugin.xml of my .diagram
project. I need also to create the object contribution class and implement
the method void run(IAction action). But, my pbs are the following:
1. In the extension point i need to specify the "ObjectClass" but i don't
know which class i need to specify (Is it an EditPart Class?)
2. I don't know how to add a label programmatically to a figure.

Can anyone help me?
Thank u in advance.
Re: Add a context menu [message #542163 is a reply to message #533634] Thu, 24 June 2010 06:32 Go to previous message
Nagesh Y J is currently offline Nagesh Y JFriend
Messages: 11
Registered: July 2009
Junior Member
1. Yes. You need to specify EditPart Class to which pop contribution to be done.

Nagesh Y.J.
Previous Topic:Hide containment of nodes
Next Topic:Properties for connections between two figures
Goto Forum:

Current Time: Sat May 18 07:11:04 GMT 2024

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

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

Back to the top