|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.common.HandleObject
org.eclipse.core.commands.common.NamedHandleObject
org.eclipse.jface.bindings.Scheme
An instance of IScheme
is a handle representing a binding
scheme as defined by the extension point org.eclipse.ui.bindings
.
The identifier of the handle is the identifier of the scheme being represented.
An instance of IScheme
can be obtained from an instance of
ICommandManager
for any identifier, whether or not a scheme
with that identifier is 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 scheme is defined, that means that
its corresponding plug-in is active. If the plug-in is then deactivated, the
scheme will still exist but it will be undefined. An attempt to use an
undefined scheme will result in a NotDefinedException
being thrown.
This class is not intended to be extended by clients.
ISchemeListener
,
CommandManager
Field Summary |
---|
Fields inherited from class org.eclipse.core.commands.common.NamedHandleObject |
---|
description, name |
Fields inherited from class org.eclipse.core.commands.common.HandleObject |
---|
defined, id, string |
Method Summary | |
---|---|
void |
addSchemeListener(ISchemeListener schemeListener)
Registers an instance of ISchemeListener to listen for
changes to attributes of this instance. |
int |
compareTo(Object object)
|
void |
define(String name,
String description,
String parentId)
Defines this scheme by giving it a name, and possibly a description and a parent identifier as well. |
boolean |
equals(Object object)
Tests whether this scheme is equal to another object. |
String |
getParentId()
Returns the identifier of the parent of the scheme represented by this handle. |
void |
removeSchemeListener(ISchemeListener schemeListener)
Unregisters an instance of ISchemeListener listening for
changes to attributes of this instance. |
String |
toString()
The string representation of this command -- for debugging purposes only. |
void |
undefine()
Makes this scheme become undefined. |
Methods inherited from class org.eclipse.core.commands.common.NamedHandleObject |
---|
getDescription, getName |
Methods inherited from class org.eclipse.core.commands.common.HandleObject |
---|
getId, hashCode, isDefined |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
public final void addSchemeListener(ISchemeListener schemeListener)
ISchemeListener
to listen for
changes to attributes of this instance.
schemeListener
- the instance of ISchemeListener
to register.
Must not be null
. If an attempt is made to
register an instance of ISchemeListener
which
is already registered with this instance, no operation is
performed.public final int compareTo(Object object)
compareTo
in interface Comparable
public final void define(String name, String description, String parentId)
Defines this scheme by giving it a name, and possibly a description and a
parent identifier as well. The defined property for the scheme automatically
becomes true
.
Notification is sent to all listeners that something has changed.
name
- The name of this scheme; must not be null
.description
- The description for this scheme; may be null
.parentId
- The parent identifier for this scheme; may be
null
.public final boolean equals(Object object)
equals
in class HandleObject
object
- The object with which to compare; may be null
.
true
if the schemes are equal; false
otherwise.public final String getParentId() throws NotDefinedException
Returns the identifier of the parent of the scheme represented by this handle.
Notification is sent to all registered listeners if this attribute changes.
null
.
NotDefinedException
- if the scheme represented by this handle is not defined.public final void removeSchemeListener(ISchemeListener schemeListener)
ISchemeListener
listening for
changes to attributes of this instance.
schemeListener
- the instance of ISchemeListener
to unregister.
Must not be null
. If an attempt is made to
unregister an instance of ISchemeListener
which
is not already registered with this instance, no operation is
performed.public final String toString()
toString
in class HandleObject
null
.public final void undefine()
null
.
Notification is sent to all listeners.
undefine
in class HandleObject
|
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.