Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Disable MMenu in the Main Menu
Disable MMenu in the Main Menu [message #988966] Tue, 04 December 2012 06:01 Go to next message
Mike Shreek is currently offline Mike ShreekFriend
Messages: 16
Registered: September 2012
Junior Member
Hello everyone, It's me again.

I just want to ask on how to disable a Menu in the Main Menu (application.e4xmi)

I tried doing this

MMenu sampleMenu = (MMenu) modelService.find("sampleMenu", application);
		sampleMenu.setEnabled(false);


Doesn't work. Crying or Very Sad

Any alternative solution for this?

Cheers!
Mike
Re: Disable MMenu in the Main Menu [message #989079 is a reply to message #988966] Tue, 04 December 2012 14:47 Go to previous messageGo to next message
Michael Niedermaier is currently offline Michael NiedermaierFriend
Messages: 2
Registered: December 2012
Junior Member
If you mean a single MenuItem....

the Handler should have a method annotated with @CanExecute which returns boolean.
if the method returns false, the menu, where the Handler is used will be disabled


Regards, Michael
Re: Disable MMenu in the Main Menu [message #989173 is a reply to message #989079] Wed, 05 December 2012 00:37 Go to previous messageGo to next message
Mike Shreek is currently offline Mike ShreekFriend
Messages: 16
Registered: September 2012
Junior Member
No I mean the main menu of the application... is it possible?
Re: Disable MMenu in the Main Menu [message #989192 is a reply to message #989173] Wed, 05 December 2012 07:02 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
Registered: July 2009
Senior Member
Am 05.12.12 01:37, schrieb Mike Shreek:
> No I mean the main menu of the application... is it possible?

This is a bug in the menu renderer.

Tom
Previous Topic:CSS Styling for disabled widgets
Next Topic:Add editors to an empty parts stack
Goto Forum:
  


Current Time: Fri Dec 19 12:01:19 GMT 2014

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

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