Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Plugin context menu conditions(Can I execute Java code to determine if a menu item should be added to context menu?)
Plugin context menu conditions [message #659054] Thu, 10 March 2011 19:43 Go to next message
ShatyUT  is currently offline ShatyUT Friend
Messages: 1
Registered: March 2011
Junior Member
I have a plugin project going. I am able to add a command to the context menu but I would like to be able to execute some Java code to determine if the item should be added to the menu. Is that possible?

I've seen plenty of examples for checking for count and stuff...even if the element is an instandOf a specific class but I need to narrow it down even further. Does someone have any examples of how to point to a method of a Java class that will return true or false to determine whether to display the menu item?

Thanks for any help!
Re: Plugin context menu conditions [message #659113 is a reply to message #659054] Fri, 11 March 2011 06:01 Go to previous message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 3/11/2011 1:13 AM, ShatyUT wrote:
> I have a plugin project going. I am able to add a command to the context
> menu but I would like to be able to execute some Java code to determine
> if the item should be added to the menu. Is that possible?
>
> I've seen plenty of examples for checking for count and stuff...even if
> the element is an instandOf a specific class but I need to narrow it
> down even further. Does someone have any examples of how to point to a
> method of a Java class that will return true or false to determine
> whether to display the menu item?
>
> Thanks for any help!

You want eclipse.platform newsgroup, cc'ing.
Previous Topic:Eclipse for Java EE 3.6.2 - glassfish cannot start from IDE but can from command line
Next Topic:Ant password InputHandler
Goto Forum:
  


Current Time: Wed Apr 24 16:41:56 GMT 2024

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

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

Back to the top