Medical Imaging Interaction Toolkit
2024.12.00
Medical Imaging Interaction Toolkit
|
#include <berryIHandlerService.h>
Additional Inherited Members | |
![]() | |
typedef Object | Self |
typedef berry::SmartPointer< Self > | Pointer |
typedef berry::SmartPointer< const Self > | ConstPointer |
typedef berry::WeakPointer< Self > | WeakPtr |
typedef berry::WeakPointer< const Self > | ConstWeakPtr |
![]() | |
static const char * | GetStaticClassName () |
static Reflection::TypeInfo | GetStaticTypeInfo () |
static QList< Reflection::TypeInfo > | GetStaticSuperclasses () |
![]() | |
Object () | |
virtual | ~Object () |
virtual QDebug | PrintSelf (QDebug os, Indent indent) const |
virtual QDebug | PrintHeader (QDebug os, Indent indent) const |
virtual QDebug | PrintTrailer (QDebug os, Indent indent) const |
![]() | |
QAtomicInt | m_ReferenceCount |
QMutex | m_ReferenceCountLock |
Provides services related to activating and deactivating handlers within the workbench.
This service can be acquired from your service locator:
IHandlerService service = (IHandlerService) getSite().getService(IHandlerService.class);
Definition at line 53 of file berryIHandlerService.h.
|
override |
|
pure virtual |
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 . |
|
pure virtual |
Activates the given handler within the context of this service. The handler becomes active when expression
evaluates to true
. This is the same as calling ActivateHandler with global==false
.
Also, it is guaranteed that the handlers submitted through a particular service will be cleaned up when that service 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 may be null if the handler should always be active. |
|
pure virtual |
Activates the given handler within the context of this service. The handler becomes active when expression
evaluates to true
. if global==false
, then this handler service must also be the active service to active the handler. For example, the handler service on a part is active when that part is active.
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 may be null if the handler should always be active. |
global | Indicates that the handler should be activated irrespectively of whether the corresponding workbench component (e.g., window, part, etc.) is active. |
|
pure virtual |
Activates the given handler from a child service. This is used by slave and nested services to promote handler activations up to the root. By using this method, it is possible for handlers coming from a more nested component to override the nested component.
activation | The activation that is local to the child service; must not be null . |
berry::IHandlerService::berryObjectMacro | ( | berry::IHandlerService | ) |
|
pure virtual |
This method creates a copy of the application context returned by GetCurrentState.
includeSelection | if true , include the default variable and selection variables |
|
pure virtual |
Creates an execution event based on an SWT event. This execution event can then be passed to a command for execution.
command | The command for which an execution event should be created; must not be null . |
uielement |
|
pure virtual |
Creates a parameterized execution event based on an SWT event and a parameterized command. This execution event can then be passed to a command for execution.
command | The parameterized command for which an execution event should be created; must not be null . |
uielement |
|
pure virtual |
Deactivates the given handler within the context of this service. If the handler was activated with a different service, then it must be deactivated from that service instead. It is only possible to retract a handler activation with this method. That is, you must have the same IHandlerActivation
used to activate the handler.
activation | The token that was returned from a call to activateHandler ; must not be null . |
|
pure virtual |
Deactivates the given handlers within the context of this service. If the handler was activated with a different service, then it must be deactivated from that service instead. It is only possible to retract a handler activation with this method. That is, you must have the same 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 . |
|
pure virtual |
Executes the command with the given identifier and no parameters.
commandId | The identifier of the command to execute; must not be null . |
uielement |
null
. ExecutionException | If the handler has problems executing this command. |
NotDefinedException | If the command you are trying to execute is not defined. |
NotEnabledException | If the command you are trying to execute is not enabled. |
NotHandledException | If there is no handler. |
|
pure virtual |
Executes the given parameterized command.
command | The parameterized command to be executed; must not be null . |
uielement |
null
. ExecutionException | If the handler has problems executing this command. |
NotDefinedException | If the command you are trying to execute is not defined. |
NotEnabledException | If the command you are trying to execute is not enabled. |
NotHandledException | If there is no handler. |
|
pure virtual |
Executes the given parameterized command in the provided context. It takes care of finding the correct active handler given the context, calls IHandler2.setEnabled(Object)
to update the enabled state if supported, and executes with that handler.
command | The parameterized command to be executed; must not be null . |
uielement | |
context | the evaluation context to run against. Must not be null |
null
. ExecutionException | If the handler has problems executing this command. |
NotDefinedException | If the command you are trying to execute is not defined. |
NotEnabledException | If the command you are trying to execute is not enabled. |
NotHandledException | If there is no handler. |
|
pure virtual |
Returns an evaluation context representing the current state of the world. This is equivalent to the application context required by ExecutionEvent.
null
.
|
pure virtual |
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.
|
pure virtual |
Sets the help context identifier to associate with a particular handler.
handler | The handler with which to register a help context identifier; must not be null . |
helpContextId | The help context identifier to register; may be null if the help context identifier should be removed. |