Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » disabling handledmenuitem
disabling handledmenuitem [message #853432] Mon, 23 April 2012 02:40 Go to next message
Christopher Riley is currently offline Christopher RileyFriend
Messages: 9
Registered: March 2012
Junior Member
Hi,

I'm trying to disable a HandledMenuItem that can later be enabled dynamically, but unchecking the 'enabled' box in the e4 workbench doesn't gray out the menu item, simply causes the menu item to throw a null pointer error when selected.

Has anyone had success with disabling HandledMenuItems and then reactivating them dynamically as needed?


Thanks!

~Christopher Riley
Re: disabling handledmenuitem [message #853575 is a reply to message #853432] Mon, 23 April 2012 06:16 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5462
Registered: July 2009
Senior Member
Implement @CanExecute in the class attached to your handler-element.

Tom

Am 23.04.12 04:40, schrieb Christopher Riley:
> Hi,
>
> I'm trying to disable a HandledMenuItem that can later be enabled
> dynamically, but unchecking the 'enabled' box in the e4 workbench
> doesn't gray out the menu item, simply causes the menu item to throw a
> null pointer error when selected.
>
> Has anyone had success with disabling HandledMenuItems and then
> reactivating them dynamically as needed?
>
>
> Thanks!
>
> ~Christopher Riley
Previous Topic:eclipse e4 basics - data model
Next Topic:Using DND in RCP Eclipse 4 application model
Goto Forum:
  


Current Time: Fri Nov 21 19:24:40 GMT 2014

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

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