|
|
|
Re: Query current activation state of handlers in plugin.xml [message #647928 is a reply to message #647835] |
Mon, 10 January 2011 13:46 |
|
On 01/09/2011 01:24 PM, ben wrote:
> Thanks for your reply. It is the activeWhen i need.
>
> What do you mean exactly with writing out the handler's state at the end
> of execute(*)?
That was me trying to understand what exactly needs "the state" and what
provides "the state".
A source provider provides one or more variables to the
IEvaluationService. It notifies the IEvaluationService that the
variable value has changed, and then the IEvaluationService takes care
of re-evaluating everybody that consumes that variable. Anything in the
system can provide state to a source provider (We update variables on
SWT events, in response to property listeners, and occasionally when
code programmatically sets information on a "Manager" provided by a
plugin activator).
The activeWhen expression determines if a given handler is active (by
consuming one or more variables from the IEvaluationService, + running
any property testers that are listed).
Your view can produce state, and presumably owns its runtime model (or
deals with the manager that does).
Handlers don't have state, they act on the state of the system. The
questions I was asking were to try and find out where your state is
coming from. Your view?
> Unfortunately, expressions cannot be extended by client code. Otherwise
> one could extent the existing expressions (with, equals, iterate, test
> ...) and provide an if-statement.
I'm not sure what you mean, exactly. The whole thing is an if statement:
if (evaluateActiveWhen(activeWhen)) { makeHandlerActive(handler); }
PW
--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
|
|
Powered by
FUDForum. Page generated in 0.01854 seconds