How to programmatically create a context menu entry for arbitrary editors? [message #520372] |
Fri, 12 March 2010 02:06 |
Eclipse User |
|
|
|
Originally posted by: formatzeh.gmx.de
Hello,
I'm currently working on a project which serves nice functionality for a
couple of editors. It can be theoretically used by editors which have
been generated with EMF, i.e. editors for editing models. Now you can
see the problem. I don't know which EMF generated editors are present at
implementation time. And if I knew it can happen that more editors will
be added in future. So I need a possibility to programmatically add a
context menu entry for every editor of my choice. I want to add a
listener in the selection service and determine where the selection took
place - if it is an (EMF generated) editor I want to add a context menu
entry. How can I achieve this?
best regards,
Gilbert
|
|
|
|
|
Re: How to programmatically create a context menu entry for arbitrary editors? [message #520590 is a reply to message #520551] |
Fri, 12 March 2010 23:29 |
Eclipse User |
|
|
|
Originally posted by: formatzeh.gmx.de
Hi Paul.
Am 12.03.2010 20:13, schrieb Paul Webster:
> Adding a context menu in what way? At the SWT level? Using
> getSite().registerContextMenu(*)? Is it for a ruler at the edge of your
> editor, or per entry field in your editor?
I desire to add entries directly in the context menu of editors - so I
target the second aspect you described.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03396 seconds