|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.action.ExternalActionManager.CommandCallback
public static class ExternalActionManager.CommandCallback
A simple implementation of the ICallback mechanism that
simply takes a BindingManager and a
CommandManager.
Note: this class is not intended to be subclassed by clients.
| Constructor Summary | |
|---|---|
ExternalActionManager.CommandCallback(BindingManager bindingManager,
CommandManager commandManager)
Constructs a new instance of CommandCallback with the
workbench it should be using. |
|
ExternalActionManager.CommandCallback(BindingManager bindingManager,
CommandManager commandManager,
ExternalActionManager.IActiveChecker activeChecker)
Constructs a new instance of CommandCallback with the
workbench it should be using. |
|
ExternalActionManager.CommandCallback(BindingManager bindingManager,
CommandManager commandManager,
ExternalActionManager.IActiveChecker activeChecker,
ExternalActionManager.IExecuteApplicable checker)
Constructs a new instance of CommandCallback with the
workbench it should be using. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.lang.String commandId,
IPropertyChangeListener listener)
Adds a listener to the object referenced by identifier. |
void |
bindingManagerChanged(BindingManagerEvent event)
Notifies that attributes inside an instance of BindingManager have changed. |
java.lang.Integer |
getAccelerator(java.lang.String commandId)
An accessor for the accelerator associated with the item indicated by the identifier. |
java.lang.String |
getAcceleratorText(java.lang.String commandId)
An accessor for the accelerator text associated with the item indicated by the identifier. |
TriggerSequence[] |
getActiveBindingsFor(java.lang.String commandId)
Returns the active bindings for a particular command identifier. |
boolean |
isAcceleratorInUse(int accelerator)
Checks to see whether the given accelerator is being used by some other mechanism (outside of the menus controlled by JFace). |
boolean |
isActive(java.lang.String commandId)
Checks whether the item matching this identifier is active. Calling this method with an undefined command id will generate a log message. |
void |
notDefined(IAction action,
NotDefinedException exception)
Fires a NotDefinedException because the action was not
defined. |
void |
notEnabled(IAction action,
NotEnabledException exception)
Fires a NotEnabledException because the action was not
enabled. |
void |
postExecuteFailure(IAction action,
ExecutionException exception)
Creates an ExecutionException when the action returned
a failure. |
void |
postExecuteSuccess(IAction action,
java.lang.Object returnValue)
Fires an execution event when the action returned a success. |
void |
preExecute(IAction action,
Event event)
Fires an execution event before an action is run. |
void |
removePropertyChangeListener(java.lang.String commandId,
IPropertyChangeListener listener)
Removes a listener from the object referenced by identifier. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExternalActionManager.CommandCallback(BindingManager bindingManager,
CommandManager commandManager)
CommandCallback with the
workbench it should be using. All commands will be considered active.
bindingManager - The binding manager which will provide the callback; must
not be null.commandManager - The command manager which will provide the callback; must
not be null.
public ExternalActionManager.CommandCallback(BindingManager bindingManager,
CommandManager commandManager,
ExternalActionManager.IActiveChecker activeChecker)
CommandCallback with the
workbench it should be using.
bindingManager - The binding manager which will provide the callback; must
not be null.commandManager - The command manager which will provide the callback; must
not be null.activeChecker - The callback mechanism for checking whether a command is
active; must not be null.
public ExternalActionManager.CommandCallback(BindingManager bindingManager,
CommandManager commandManager,
ExternalActionManager.IActiveChecker activeChecker,
ExternalActionManager.IExecuteApplicable checker)
CommandCallback with the
workbench it should be using.
bindingManager - The binding manager which will provide the callback; must
not be null.commandManager - The command manager which will provide the callback; must
not be null.activeChecker - The callback mechanism for checking whether a command is
active; must not be null.checker - The callback to check if an IAction should fire execution
events.| Method Detail |
|---|
public final void addPropertyChangeListener(java.lang.String commandId,
IPropertyChangeListener listener)
ExternalActionManager.ICallback
Adds a listener to the object referenced by identifier.
This listener will be notified if a property of the item is to be
changed. This identifier is specific to mechanism being used. In the
case of the Eclipse workbench, this is the command identifier.
Has no effect if an identical listener has already been added for
the identifier.
addPropertyChangeListener in interface ExternalActionManager.ICallbackcommandId - The identifier of the item to which the listener should be
attached; must not be null.listener - The listener to be added; must not be null.ExternalActionManager.ICallback.addPropertyChangeListener(String,
IPropertyChangeListener)public final void bindingManagerChanged(BindingManagerEvent event)
IBindingManagerListenerBindingManager have changed.
Specific details are described in the BindingManagerEvent. Changes in the
binding manager can cause the set of defined or active schemes or bindings to change.
bindingManagerChanged in interface IBindingManagerListenerevent - the binding manager event. Guaranteed not to be null.public final java.lang.Integer getAccelerator(java.lang.String commandId)
ExternalActionManager.ICallback
getAccelerator in interface ExternalActionManager.ICallbackcommandId - The identifier of the item from which the accelerator
should be obtained ; must not be null.
ExternalActionManager.ICallback.getAccelerator(String)public final java.lang.String getAcceleratorText(java.lang.String commandId)
ExternalActionManager.ICallback
getAcceleratorText in interface ExternalActionManager.ICallbackcommandId - The identifier of the item from which the accelerator text
should be obtained ; must not be null.
ExternalActionManager.ICallback.getAcceleratorText(String)public final TriggerSequence[] getActiveBindingsFor(java.lang.String commandId)
getActiveBindingsFor in interface ExternalActionManager.IBindingManagerCallbackcommandId - The identifier of the command whose bindings are
requested. This argument may be null. It
is assumed that the command has no parameters.
TriggerSequence)
for a particular command identifier. This value is guaranteed
not to be null, but it may be empty.public final boolean isAcceleratorInUse(int accelerator)
ExternalActionManager.ICallback
isAcceleratorInUse in interface ExternalActionManager.ICallbackaccelerator - The accelerator to check -- in SWT's internal accelerator
format.
true if the accelerator is already being used
and shouldn't be used again; false otherwise.ExternalActionManager.ICallback.isAcceleratorInUse(int)public final boolean isActive(java.lang.String commandId)
isActive in interface ExternalActionManager.ICallbackcommandId - The identifier of the item from which the active state
should be retrieved; must not be null.
true if the item is active; false
otherwise.
public final void removePropertyChangeListener(java.lang.String commandId,
IPropertyChangeListener listener)
ExternalActionManager.ICallbackidentifier. This identifier is specific to mechanism
being used. In the case of the Eclipse workbench, this is the command
identifier.
removePropertyChangeListener in interface ExternalActionManager.ICallbackcommandId - The identifier of the item to from the listener should be
removed; must not be null.listener - The listener to be removed; must not be null.ExternalActionManager.ICallback.removePropertyChangeListener(String,
IPropertyChangeListener)
public void preExecute(IAction action,
Event event)
ExternalActionManager.IExecuteCallback
preExecute in interface ExternalActionManager.IExecuteCallbackaction - The action contribution that requires an
execution event to be fired. Cannot be null.event - The SWT Event, may be null.
public void postExecuteSuccess(IAction action,
java.lang.Object returnValue)
ExternalActionManager.IExecuteCallback
postExecuteSuccess in interface ExternalActionManager.IExecuteCallbackaction - The action contribution that requires an
execution event to be fired. Cannot be null.returnValue - The command's result, may be null.
public void postExecuteFailure(IAction action,
ExecutionException exception)
ExternalActionManager.IExecuteCallbackExecutionException when the action returned
a failure.
postExecuteFailure in interface ExternalActionManager.IExecuteCallbackaction - The action contribution that caused the exception,
never null.exception - The ExecutionException, never null.
public void notDefined(IAction action,
NotDefinedException exception)
ExternalActionManager.IExecuteCallbackNotDefinedException because the action was not
defined.
notDefined in interface ExternalActionManager.IExecuteCallbackaction - The action contribution that caused the exception,
never null.exception - The NotDefinedException, never null.
public void notEnabled(IAction action,
NotEnabledException exception)
ExternalActionManager.IExecuteCallbackNotEnabledException because the action was not
enabled.
notEnabled in interface ExternalActionManager.IExecuteCallbackaction - The action contribution that caused the exception,
never null.exception - The NotEnabledException, never null.
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.