[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: Adding Items to Outline Popup Menu

Mike,

You have run into a limitation of the current design.
Normally, views which want to allow other plugins to contribute to their
context menu must register it using
IWorkbenchPartSite.registerContextMenu(...).
Unfortunately, pages which are contributed to the Outline view are not given
access to the IWorkbenchPartSite, or any other API for registering a context
menu.

Note that the Outline view is a generic view of the Eclipse UI.  JDT
contributes its outline page to it, but it has no way of registering its
context menu.  So this is a limitation of Eclipse UI, not JDT.

This is a known problem, which we are considering how best to fix.

Nick

"Mike Walker" <michaelw@xxxxxxxxxx> wrote in message
news:9k99tq$mab$1@xxxxxxxxxxxxxxxx
> Hi,
>
> Not sure if this has come up before, but it appears that the Outline View
> of the Java perspective - i.e. the one which displays methods and fields
> for a class or interface - does not allow a plugin to add menu items. I
> have tried all I know to add items into this view but without success, and
> looking at the source code it does not appear that the JavaOutlineView
> code permits another plugin to insert menu items.
>
> Is this a bug - or am I just not getting the plugin.xml entries correct?
> (I am able to modify the Packages View popup menu, so I don't think I am
> doing anything wrong. If it is supposed to work please can someone append
> an example here.
>
> Thanks,
>
> Mike
>