|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IHandlerService
Provides services related to activating and deactivating handlers within the workbench.
This interface is not intended to be implemented or extended by clients.
EXPERIMENTAL. The commands architecture is currently under development for Eclipse 3.1. This class -- its existence, its name and its methods -- are in flux. Do not use this class yet.
Method Summary | |
---|---|
IHandlerActivation |
activateHandler(java.lang.String commandId,
IHandler handler)
Activates the given handler within the context of this service. |
IHandlerActivation |
activateHandler(java.lang.String commandId,
IHandler handler,
Expression expression,
int sourcePriorities)
Activates the given handler within the context of this service. |
void |
deactivateHandler(IHandlerActivation activation)
Deactivates the given handler within the context of this service. |
void |
deactivateHandlers(java.util.Collection activations)
Deactivates the given handlers within the context of this service. |
void |
readRegistry()
Reads the handler information from the registry. |
Method Detail |
---|
IHandlerActivation activateHandler(java.lang.String commandId, IHandler handler)
Activates the given handler within the context of this service. If this service was retrieved from the workbench, then this handler will be active globally. If the service was retrieved from a nested component, then the handler will only be active within that component.
Also, it is guaranteed that the handlers submitted through a particular
service will be cleaned up when that services is destroyed. So, for
example, a service retrieved from a IWorkbenchPartSite
would deactivate all of its handlers when the site is destroyed.
commandId
- The identifier for the command which this handler handles;
must not be null
.handler
- The handler to activate; must not be null
.
IHandlerActivation activateHandler(java.lang.String commandId, IHandler handler, Expression expression, int sourcePriorities)
Activates the given handler within the context of this service. The
handler becomes active when expression
evaluates to
true
.
Also, it is guaranteed that the handlers submitted through a particular
service will be cleaned up when that services is destroyed. So, for
example, a service retrieved from a IWorkbenchPartSite
would deactivate all of its handlers when the site is destroyed.
commandId
- The identifier for the command which this handler handles;
must not be null
.handler
- The handler to activate; must not be null
.expression
- This expression must evaluate to true
before
this handler will really become active. The expression must
not be null
.sourcePriorities
- The source priorities for the expression.
ISources
void deactivateHandler(IHandlerActivation activation)
IHandlerActivation
used to activate the handler.
activation
- The token that was returned from a call to
activateHandler
; must not be null
.void deactivateHandlers(java.util.Collection activations)
IHandlerActivation
used to activate the handler.
activations
- The tokens that were returned from a call to
activateHandler
. This collection must only
contain instances of IHandlerActivation
. The
collection must not be null
.void readRegistry()
Reads the handler information from the registry. This will overwrite any of the existing information in the handler service. This method is intended to be called during start-up. When this method completes, this handler service will reflect the current state of the registry.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |