Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » get the standard context menu on custom objects
get the standard context menu on custom objects [message #326006] Wed, 05 March 2008 15:17 Go to next message
Andreas Pakulat is currently offline Andreas PakulatFriend
Messages: 127
Registered: July 2009
Senior Member
Hi,

I'm having a slight problem here figuring out how I get the standard
navigator context menu on my custom objects.

The contentprovider provides a hierarchy of

Project
Suite

objects and when I right-click on a suite I don't get any context menu.

So how can I let eclipse know that I'd like to get the same menu as for a
folder there?

Andreas
Re: get the standard context menu on custom objects [message #326009 is a reply to message #326006] Wed, 05 March 2008 15:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Andreas,

Maybe if the object is an IAdaptable and adapts to an IFolder.class it
will work...


Andreas Pakulat wrote:
> Hi,
>
> I'm having a slight problem here figuring out how I get the standard
> navigator context menu on my custom objects.
>
> The contentprovider provides a hierarchy of
>
> Project
> Suite
>
> objects and when I right-click on a suite I don't get any context menu.
>
> So how can I let eclipse know that I'd like to get the same menu as for a
> folder there?
>
> Andreas
>
Re: get the standard context menu on custom objects [message #326010 is a reply to message #326009] Wed, 05 March 2008 15:58 Go to previous message
Andreas Pakulat is currently offline Andreas PakulatFriend
Messages: 127
Registered: July 2009
Senior Member
Ed Merks wrote:

> Andreas,
>
> Maybe if the object is an IAdaptable and adapts to an IFolder.class it
> will work...

That doesn't work unfortunately (though if I read the plugin.xml from
org.eclipse.ui.navigator.resource properly it should work). However I can't
do that anyway, as I'm working with objects that do not know they are
IFolders.

I'm just trying to find a way to do this without having to duplicate some
code from the ActionProviders in the eclipse plugins.

Andreas
Previous Topic:How to contribute a context menu to the Outline view
Next Topic:[DataBinding]
Goto Forum:
  


Current Time: Tue Oct 01 10:40:01 GMT 2024

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

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

Back to the top