|
Re: How to add menu item to figure's context menu? [message #197529 is a reply to message #197521] |
Tue, 04 October 2005 10:01 |
Eclipse User |
|
|
|
Originally posted by: wjancz.\/\/asko.pl(change \/\/ with w)
> Hi all,
>
> I have a problem that I want to add menu item to editpart's figure context
> menu.
> At that menu I want to put action which opens dialog which will work with
> model data of that figure.
>
> Thanks,
> John Cage
At your editors part class You override configureGraphicalViewer() method
where you are setting a context menu provider.
Your context menu provider class which sholud extend ContextMenuProvider
class should override buildContextMenu() method where you build a context
menu. There you have a manager to which one You can add any action which
extends org.eclipse.jface.action.Action class.
Tell me if it was helpfull for You :) ?
...::WojT::..
|
|
|
|
Re: How to add menu item to figure's context menu? [message #198261 is a reply to message #197610] |
Sun, 09 October 2005 09:18 |
Eclipse User |
|
|
|
Originally posted by: alextret.yahoo.com
I was quite successful in adding items to context menus with minimal
programming, by tweaking plugin.xml (added objectContribution to
org.eclipse.ui.popupMenus extension point).
However, how do I get rid of unwanted and irrelevant menu items supplied by
the platform by default (in my case, it is "Run As", "Debug As", "Compare
With" and "Replace With")?
I should note that some of the menu items supplied by the platform, in my
case, are quite relevant and work just fine (specifically, Undo, Redo and
Delete).
"John Cage" <ahanys@seznam.cz> wrote in message
news:dhu527$dsr$1@news.eclipse.org...
> Yes it helps me :)
>
> Thanks,
> John Cage
>
|
|
|
Re: How to add menu item to figure's context menu? [message #198275 is a reply to message #198261] |
Sun, 09 October 2005 19:47 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
I don't think there's a way. Inquire on the platform newsgroup.
"Alexei Tretiakov" <alextret@yahoo.com> wrote in message
news:diam99$i0h$1@news.eclipse.org...
> I was quite successful in adding items to context menus with minimal
> programming, by tweaking plugin.xml (added objectContribution to
> org.eclipse.ui.popupMenus extension point).
>
> However, how do I get rid of unwanted and irrelevant menu items supplied
by
> the platform by default (in my case, it is "Run As", "Debug As", "Compare
> With" and "Replace With")?
>
> I should note that some of the menu items supplied by the platform, in my
> case, are quite relevant and work just fine (specifically, Undo, Redo and
> Delete).
>
> "John Cage" <ahanys@seznam.cz> wrote in message
> news:dhu527$dsr$1@news.eclipse.org...
> > Yes it helps me :)
> >
> > Thanks,
> > John Cage
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03247 seconds