Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Change menu item toggle based on current editor
Change menu item toggle based on current editor [message #1734741] Fri, 10 June 2016 21:28 Go to next message
Lee Carver is currently offline Lee CarverFriend
Messages: 3
Registered: July 2009
Junior Member
I would like to place an item on the menu that toggles display behavior in an editor for an underlying document. (E.g. shapes based on roles vs. edge degrees). The document is responsible to persist the value, and the menu item's toggle state should reflect the saved value in the document.

I can place the items on the menu via the commands and menus extension points. By activating the style=toggle, I can activate whether the menu table state is displayed.

However the State mechanism needs to be tied into the current editor, not a Registry persistent state. Are there examples where a command state is provided by the currently active editor?
Re: Change menu item toggle based on current editor [message #1734861 is a reply to message #1734741] Mon, 13 June 2016 14:46 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 493
Registered: July 2009
Senior Member

Hi Lee,

Do you mean enabledwhen with activePartId?

http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fworkbench_cmd_expressions.htm

Cheers,

Wim
Re: Change menu item toggle based on current editor [message #1734875 is a reply to message #1734741] Mon, 13 June 2016 14:46 Go to previous message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 423
Registered: July 2009
Senior Member
Hi Lee,

Do you mean enabledwhen with activePartId?

http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fworkbench_cmd_expressions.htm

Cheers,

Wim
Previous Topic:variable ${target.nl}
Next Topic:RCP app in mac build shows "JRE does not support debug mode"
Goto Forum:
  


Current Time: Wed Apr 24 18:15:12 GMT 2024

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

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

Back to the top