|
| berryObjectMacro (berry::IHandlerService) |
|
| ~IHandlerService () override |
|
virtual SmartPointer< IHandlerActivation > | ActivateHandler (const SmartPointer< IHandlerActivation > &activation)=0 |
|
virtual SmartPointer< IHandlerActivation > | ActivateHandler (const QString &commandId, const SmartPointer< IHandler > &handler)=0 |
|
virtual SmartPointer< IHandlerActivation > | ActivateHandler (const QString &commandId, const SmartPointer< IHandler > &handler, const SmartPointer< Expression > &expression)=0 |
|
virtual SmartPointer< IHandlerActivation > | ActivateHandler (const QString &commandId, const SmartPointer< IHandler > &handler, const SmartPointer< Expression > &expression, bool global)=0 |
|
virtual SmartPointer< const ExecutionEvent > | CreateExecutionEvent (const SmartPointer< const Command > &command, const SmartPointer< const UIElement > &uielement)=0 |
|
virtual SmartPointer< const ExecutionEvent > | CreateExecutionEvent (const SmartPointer< const ParameterizedCommand > &command, const SmartPointer< const UIElement > &uielement)=0 |
|
virtual void | DeactivateHandler (const SmartPointer< IHandlerActivation > &activation)=0 |
|
virtual void | DeactivateHandlers (const QList< SmartPointer< IHandlerActivation > > &activations)=0 |
|
virtual Object::Pointer | ExecuteCommand (const QString &commandId, const SmartPointer< const UIElement > &uielement)=0 |
|
virtual Object::Pointer | ExecuteCommand (const SmartPointer< ParameterizedCommand > &command, const SmartPointer< const UIElement > &uielement)=0 |
|
virtual Object::Pointer | ExecuteCommandInContext (const SmartPointer< ParameterizedCommand > &command, const SmartPointer< const UIElement > &uielement, const SmartPointer< IEvaluationContext > &context)=0 |
|
virtual SmartPointer< IEvaluationContext > | CreateContextSnapshot (bool includeSelection)=0 |
|
virtual SmartPointer< IEvaluationContext > | GetCurrentState () const =0 |
|
virtual void | ReadRegistry ()=0 |
|
virtual void | SetHelpContextId (const SmartPointer< IHandler > &handler, const QString &helpContextId)=0 |
|
| berryObjectMacro (berry::IServiceWithSources) |
|
| ~IServiceWithSources () override |
|
virtual void | AddSourceProvider (const SmartPointer< ISourceProvider > &provider)=0 |
|
virtual void | RemoveSourceProvider (const SmartPointer< ISourceProvider > &provider)=0 |
|
| berryObjectMacro (berry::IDisposable) |
|
| ~IDisposable () override |
|
virtual void | Dispose ()=0 |
|
virtual QString | GetClassName () const |
|
virtual Reflection::TypeInfo | GetTypeInfo () const |
|
virtual QList< Reflection::TypeInfo > | GetSuperclasses () const |
|
virtual void | Delete () |
|
QDebug | Print (QDebug os, Indent Indent=0) const |
|
virtual QString | ToString () const |
|
virtual uint | HashCode () const |
|
virtual bool | operator< (const Object *) const |
|
void | Register () const |
|
void | UnRegister (bool del=true) const |
|
int | GetReferenceCount () const |
|
void | SetReferenceCount (int) |
|
void | AddDestroyListener (const MessageAbstractDelegate<> &delegate) const |
|
void | RemoveDestroyListener (const MessageAbstractDelegate<> &delegate) const |
|
virtual bool | operator== (const Object *) const |
|
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);
-
This service is available globally.
- Note
- This interface is not intended to be implemented by clients.
-
This interface is not intended to be extended by clients.
- Since
- 3.1
Definition at line 53 of file berryIHandlerService.h.
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.
- Parameters
-
commandId | The identifier for the command which this handler handles; must not be null . |
handler | The handler to activate; must not be null . |
- Returns
- A token which can be used to later cancel the activation. Only someone with access to this token can cancel the activation. The activation will automatically be cancelled if the context from which this service was retrieved is destroyed.
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.
- Parameters
-
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. |
- Returns
- A token which can be used to later cancel the activation. Only someone with access to this token can cancel the activation. The activation will automatically be cancelled if the context from which this service was retrieved is destroyed.
- See also
- org.eclipse.ui.ISources
- Since
- 3.2