Interface ICommand
-
- All Superinterfaces:
Comparable
@Deprecated public interface ICommand extends Comparable
Deprecated.Please use the "org.eclipse.core.commands" plug-in instead. This API is scheduled for deletion, see Bug 431177 for detailsAn instance of
ICommand
is a handle representing a command as defined by the extension pointorg.eclipse.ui.commands
. The identifier of the handle is identifier of the command being represented.An instance of
ICommand
can be obtained from an instance ofICommandManager
for any identifier, whether or not a command with that identifier defined in the plugin registry.The handle-based nature of this API allows it to work well with runtime plugin activation and deactivation. If a command is defined, that means that its corresponding plug-in is active. If the plug-in is then deactivated, the command will still exist but it will be undefined. An attempts to use an undefined command will result in a
NotDefinedException
being thrown.This interface is not intended to be extended or implemented by clients.
- Since:
- 3.0
- See Also:
ICommandListener
,ICommandManager
,Command
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
- Restriction:
- This interface is scheduled for deletion.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addCommandListener(ICommandListener commandListener)
Deprecated.Object
execute(Map parameterValuesByName)
Deprecated.Map
getAttributeValuesByName()
Deprecated.String
getCategoryId()
Deprecated.String
getDescription()
Deprecated.String
getId()
Deprecated.List
getKeySequenceBindings()
Deprecated.Returns the list of key sequence bindings for this handle.String
getName()
Deprecated.boolean
isDefined()
Deprecated.boolean
isHandled()
Deprecated.void
removeCommandListener(ICommandListener commandListener)
Deprecated.-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
addCommandListener
@Deprecated void addCommandListener(ICommandListener commandListener)
Deprecated.Registers an instance ofICommandListener
to listen for changes to attributes of this instance.- Parameters:
commandListener
- the instance ofICommandListener
to register. Must not benull
. If an attempt is made to register an instance ofICommandListener
which is already registered with this instance, no operation is performed.
-
execute
@Deprecated Object execute(Map parameterValuesByName) throws ExecutionException, NotHandledException
Deprecated.Executes with the map of parameter values by name.- Parameters:
parameterValuesByName
- the map of parameter values by name. Reserved for future use, must benull
.- Returns:
- the result of the execution. Reserved for future use, must be
null
. - Throws:
ExecutionException
- if an exception occurred during execution.NotHandledException
- if this is not handled.
-
getAttributeValuesByName
@Deprecated Map getAttributeValuesByName() throws NotHandledException
Deprecated.Returns the map of attribute values by name.Notification is sent to all registered listeners if this property changes.
- Returns:
- the map of attribute values by name. This map may be empty, but is
guaranteed not to be
null
. If this map is not empty, its collection of keys is guaranteed to only contain instances ofString
. - Throws:
NotHandledException
- if this is not handled.
-
getCategoryId
@Deprecated String getCategoryId() throws NotDefinedException
Deprecated.Returns the identifier of the category of the command represented by this handle.
Notification is sent to all registered listeners if this attribute changes.
- Returns:
- the identifier of the category of the command represented by this
handle. May be
null
. - Throws:
NotDefinedException
- if the command represented by this handle is not defined.
-
getDescription
@Deprecated String getDescription() throws NotDefinedException
Deprecated.Returns the description of the command represented by this handle, suitable for display to the user.
Notification is sent to all registered listeners if this attribute changes.
- Returns:
- the description of the command represented by this handle. Guaranteed
not to be
null
. - Throws:
NotDefinedException
- if the command represented by this handle is not defined.
-
getId
@Deprecated String getId()
Deprecated.Returns the identifier of this handle.- Returns:
- the identifier of this handle. Guaranteed not to be
null
.
-
getKeySequenceBindings
List getKeySequenceBindings()
Deprecated.Returns the list of key sequence bindings for this handle. This method will return all key sequence bindings for this handle's identifier, whether or not the command represented by this handle is defined.
Notification is sent to all registered listeners if this attribute changes.
- Returns:
- the list of key sequence bindings. This list may be empty, but is
guaranteed not to be
null
. If this list is not empty, it is guaranteed to only contain instances ofIKeySequenceBinding
.
-
getName
@Deprecated String getName() throws NotDefinedException
Deprecated.Returns the name of the command represented by this handle, suitable for display to the user.
Notification is sent to all registered listeners if this attribute changes.
- Returns:
- the name of the command represented by this handle. Guaranteed not to
be
null
. - Throws:
NotDefinedException
- if the command represented by this handle is not defined.
-
isDefined
@Deprecated boolean isDefined()
Deprecated.Returns whether or not the command represented by this handle is defined.
Notification is sent to all registered listeners if this attribute changes.
- Returns:
true
, iff the command represented by this handle is defined.
-
isHandled
@Deprecated boolean isHandled()
Deprecated.Returns whether or not this command is handled. A command is handled if it currently has an
IHandler
instance associated with it. A command needs a handler to carry out theexecute(Map)
method.Notification is sent to all registered listeners if this attribute changes.
- Returns:
true
, iff this command is enabled.
-
removeCommandListener
@Deprecated void removeCommandListener(ICommandListener commandListener)
Deprecated.Unregisters an instance ofICommandListener
listening for changes to attributes of this instance.- Parameters:
commandListener
- the instance ofICommandListener
to unregister. Must not benull
. If an attempt is made to unregister an instance ofICommandListener
which is not already registered with this instance, no operation is performed.
-
-