Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Toggle Handled Menu Item initialisation and persisted state
Toggle Handled Menu Item initialisation and persisted state [message #1599584] Tue, 03 February 2015 18:50
ALex W is currently offline ALex WFriend
Messages: 56
Registered: July 2012
Member
Hello all,

I'm working on a e4 application and I need to have a menu toggle button.
No issue to create it in my plugin fragment.e4xmi and have it display.

I do have the command and handler linked to it, with both @CanExecute and @Execute methods in the handler class.

The state of the toggle is linked to some boolean state in a OSGI Service and is changed in the execute method :
	@Execute
	public void execute( MHandledMenuItem menuItem, MyOSGIService osgiService){
		osgiService.setStrictMode(menuItem.isSelected());
	}


My question :
- How can I initialise the state of the button when the application starts ? By default, the toggle is unselected, no matter the state of the boolean in the service.
- Is it possible to have persisted states in the command/handler ? If so, how ? Using the @Persist annotation seems to be inefficient.

Thanks
Previous Topic:A MWindow with isToBeRendered to true and getWidget returning null
Next Topic:part handler question
Goto Forum:
  


Current Time: Sun Jan 17 19:48:25 GMT 2021

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

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

Back to the top