Package org.eclipse.core.commands.common
Class NamedHandleObject
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.core.commands.common.HandleObject
-
- org.eclipse.core.commands.common.NamedHandleObject
-
- All Implemented Interfaces:
IIdentifiable
public abstract class NamedHandleObject extends HandleObject
A handle object that carries with it a name and a description. This type of handle object is quite common across the commands code base. For example,Command
,Context
andScheme
.- Since:
- 3.1
-
-
Field Summary
Fields Modifier and Type Field Description protected String
description
The description for this handle.protected String
name
The name of this handle.-
Fields inherited from class org.eclipse.core.commands.common.HandleObject
defined, id, string
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NamedHandleObject(String id)
Constructs a new instance ofNamedHandleObject
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
Returns the description for this handle.String
getName()
Returns the name for this handle.-
Methods inherited from class org.eclipse.core.commands.common.HandleObject
equals, getId, hashCode, isDefined, toString, undefine
-
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
-
-
-
Constructor Detail
-
NamedHandleObject
protected NamedHandleObject(String id)
Constructs a new instance ofNamedHandleObject
.- Parameters:
id
- The identifier for this handle; must not benull
.
-
-
Method Detail
-
getDescription
public String getDescription() throws NotDefinedException
Returns the description for this handle.- Returns:
- The description; may be
null
if there is no description. - Throws:
NotDefinedException
- If the handle is not currently defined.
-
getName
public String getName() throws NotDefinedException
Returns the name for this handle.- Returns:
- The name for this handle; never
null
. - Throws:
NotDefinedException
- If the handle is not currently defined.
-
-