|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An instance of ICommandManager
can be used to obtain instances
of ICommand
, as well as manage whether or not those instances
are active or inactive, enabled or disabled.
This interface is not intended to be extended or implemented by clients.
ICommand
,
ICommandManagerListener
,
CommandManager
Method Summary | |
---|---|
void |
addCommandManagerListener(ICommandManagerListener commandManagerListener)
Deprecated. Registers an instance of ICommandManagerListener to listen
for changes to attributes of this instance. |
Set |
getActiveContextIds()
Deprecated. Returns the set of identifiers to active contexts. |
String |
getActiveKeyConfigurationId()
Deprecated. Returns the active key configuration. |
String |
getActiveLocale()
Deprecated. Returns the active locale. |
String |
getActivePlatform()
Deprecated. Returns the active platform. |
ICategory |
getCategory(String categoryId)
Deprecated. Returns a handle to a category given an identifier. |
ICommand |
getCommand(String commandId)
Deprecated. Returns a handle to a command given an identifier. |
Set |
getDefinedCategoryIds()
Deprecated. Returns the set of identifiers to defined categories. |
Set |
getDefinedCommandIds()
Deprecated. Returns the set of identifiers to defined commands. |
Set |
getDefinedKeyConfigurationIds()
Deprecated. Returns the set of identifiers to defined key configurations. |
IKeyConfiguration |
getKeyConfiguration(String keyConfigurationId)
Deprecated. Returns a handle to a key configuration given an identifier. |
Map |
getPartialMatches(KeySequence keySequence)
Deprecated. Finds all of the commands which have key bindings that start with the given key sequence. |
String |
getPerfectMatch(KeySequence keySequence)
Deprecated. Finds the command which has the given key sequence as one of its key bindings. |
boolean |
isPartialMatch(KeySequence keySequence)
Deprecated. Checks to see whether there are any commands which have key bindings that start with the given key sequence. |
boolean |
isPerfectMatch(KeySequence keySequence)
Deprecated. Checks to see if there is a command with the given key sequence as one of its key bindings. |
void |
removeCommandManagerListener(ICommandManagerListener commandManagerListener)
Deprecated. Unregisters an instance of ICommandManagerListener
listening for changes to attributes of this instance. |
Method Detail |
public void addCommandManagerListener(ICommandManagerListener commandManagerListener)
ICommandManagerListener
to listen
for changes to attributes of this instance.
commandManagerListener
- the instance of ICommandManagerListener
to
register. Must not be null
. If an attempt is
made to register an instance of
ICommandManagerListener
which is already
registered with this instance, no operation is performed.public Set getActiveContextIds()
Notification is sent to all registered listeners if this property changes.
null
. If this
set is not empty, it is guaranteed to only contain instances of
String
.public String getActiveKeyConfigurationId()
Notification is sent to all registered listeners if this property changes.
null
. If this set
is not empty, it is guaranteed to only contains instances of
String
.public String getActiveLocale()
Locale.getDefault()
, it may also be changed
at runtime by different implementations of command manager.
Notification is sent to all registered listeners if this property changes.
null
.public String getActivePlatform()
SWT.getPlatform()
, it may also be
changed at runtime by different implementations of command manager.
Notification is sent to all registered listeners if this property changes.
null
.public ICategory getCategory(String categoryId)
categoryId
- an identifier. Must not be null
public ICommand getCommand(String commandId)
commandId
- an identifier. Must not be null
null
.public Set getDefinedCategoryIds()
Returns the set of identifiers to defined categories.
Notification is sent to all registered listeners if this attribute changes.
null
. If this
set is not empty, it is guaranteed to only contain instances of
String
.public Set getDefinedCommandIds()
Returns the set of identifiers to defined commands.
Notification is sent to all registered listeners if this attribute changes.
null
. If this
set is not empty, it is guaranteed to only contain instances of
String
.public Set getDefinedKeyConfigurationIds()
Returns the set of identifiers to defined key configurations.
Notification is sent to all registered listeners if this attribute changes.
null
.
If this set is not empty, it is guaranteed to only contain
instances of String
.public IKeyConfiguration getKeyConfiguration(String keyConfigurationId)
keyConfigurationId
- an identifier. Must not be null
public Map getPartialMatches(KeySequence keySequence)
keySequence
- The prefix to look for; must not be null
.
KeySequence
) to command identifiers (
String
). This map may be empty, but it is never
null
.public String getPerfectMatch(KeySequence keySequence)
keySequence
- The key binding to look for; must not be null
.
null
if none.public boolean isPartialMatch(KeySequence keySequence)
keySequence
- The prefix to look for; must not be null
.
true
if at least one command has a key binding
that starts with keySequence
;false
otherwise.public boolean isPerfectMatch(KeySequence keySequence)
keySequence
- The key binding to look for; must not be null
.
true
if a command has a matching key binding;
false
otherwise.public void removeCommandManagerListener(ICommandManagerListener commandManagerListener)
ICommandManagerListener
listening for changes to attributes of this instance.
commandManagerListener
- the instance of ICommandManagerListener
to
unregister. Must not be null
. If an attempt is
made to unregister an instance of
ICommandManagerListener
which is not already
registered with this instance, no operation is performed.
|
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.