Package org.eclipse.core.commands
Class Category
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.common.HandleObject
org.eclipse.core.commands.common.NamedHandleObject
org.eclipse.core.commands.Category
- All Implemented Interfaces:
IIdentifiable
A logical group for a set of commands. A command belongs to exactly one category. The category has no functional effect, but may be used in graphical tools that want to group the set of commands somehow.
- Since:
- 3.1
-
Field Summary
Fields inherited from class org.eclipse.core.commands.common.NamedHandleObject
description, nameFields inherited from class org.eclipse.core.commands.common.HandleObject
defined, id, string -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddCategoryListener(ICategoryListener categoryListener) Adds a listener to this category that will be notified when this category's state changes.final voidDefines this category by giving it a name, and possibly a description as well.final voidremoveCategoryListener(ICategoryListener categoryListener) Removes a listener from this category.toString()The string representation of this object -- for debugging purposes only.voidundefine()Makes this object becomes undefined.Methods inherited from class org.eclipse.core.commands.common.NamedHandleObject
getDescription, getNameMethods inherited from class org.eclipse.core.commands.common.HandleObject
equals, getId, hashCode, isDefinedMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
Method Details
-
addCategoryListener
Adds a listener to this category that will be notified when this category's state changes.- Parameters:
categoryListener- The listener to be added; must not benull.
-
define
Defines this category by giving it a name, and possibly a description as well. The defined property automatically becomes
true.Notification is sent to all listeners that something has changed.
- Parameters:
name- The name of this command; must not benull.description- The description for this command; may benull.
-
removeCategoryListener
Removes a listener from this category.- Parameters:
categoryListener- The listener to be removed; must not benull.
-
toString
Description copied from class:HandleObjectThe string representation of this object -- for debugging purposes only. This string should not be shown to an end user.- Specified by:
toStringin classHandleObject- Returns:
- The string representation; never
null.
-
undefine
public void undefine()Description copied from class:HandleObjectMakes this object becomes undefined. This method should make any defined propertiesnull. It should also send notification to any listeners that these properties have changed.- Specified by:
undefinein classHandleObject
-