|
Eclipse Platform Release 3.1 |
|||||||||
| 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.
| 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 |
addSourceProvider(ISourceProvider provider)
Adds a source provider to 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. |
IEvaluationContext |
getCurrentState()
Returns an evaluation context representing the current state of the world. |
void |
readRegistry()
Reads the handler information from the registry. |
void |
removeSourceProvider(ISourceProvider provider)
Removes a source provider from this service. |
| 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.
ISourcesvoid addSourceProvider(ISourceProvider provider)
provider - The provider to add; must not be null.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.IEvaluationContext getCurrentState()
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.
void removeSourceProvider(ISourceProvider provider)
provider - The provider to remove; must not be null.
|
Eclipse Platform Release 3.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.