Add a context menu [message #533634] |
Fri, 14 May 2010 16:11  |
Eclipse User |
|
|
|
Hi,
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
ellipse.
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.
|
|
|
|
Powered by
FUDForum. Page generated in 0.72651 seconds