Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » updating menu contributions from editor state
updating menu contributions from editor state [message #604510] Thu, 04 February 2010 19:06
Alan Chaney is currently offline Alan ChaneyFriend
Messages: 20
Registered: January 2010
Junior Member
I'm writing an image editing plug-in which has internal state which can be changed by user mouse gestures. When the internal state changes it needs to enable/disable menu contributions.

I'm targeting 3.5 and the consensus seems to be that its best to use the 'command' framework. I found a similar post on this issue which recommended writing a 'PropertyTester' to programatically control menu contribution enablement. I've done that, but the problem is that when my state changes the menu doesn't always get updated.

I have looked at doing the whole thing with IAction contributions but that seems a bit of a retrograde step and anyway it doesn't seem a good idea to mix 'actions' and 'commands' in the same plug-in (or not??)

Anyway, my question is:

1. is there a way of programatically updating the 'enabled' state of a menu contribution handler from within my editor? Sorry if there is an obvious way but I can't seem to find it.

AND/OR

2. Can I trigger an event which will cause the framework to update menu contributions? This would make it use my property tester which works.

Thanks in advance

Alan
Previous Topic:updating menu contributions from editor state
Next Topic:Headless build not adding jars from binary plug-ins to build path?
Goto Forum:
  


Current Time: Fri Apr 26 09:09:43 GMT 2024

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

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

Back to the top