Class UndoContext
- java.lang.Object
-
- org.eclipse.core.commands.operations.UndoContext
-
- All Implemented Interfaces:
IUndoContext
- Direct Known Subclasses:
ObjectUndoContext
public class UndoContext extends Object implements IUndoContext
A simple, lightweight undo context that can be used to tag any operation. It does not provided a specialized label. This class may be instantiated by clients. This class may also be subclassed.
- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description UndoContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLabel()
Get the label that describes the undo context.boolean
matches(IUndoContext context)
Return whether the specified context is considered a match for the receiving context.
-
-
-
Method Detail
-
getLabel
public String getLabel()
Get the label that describes the undo context. The default implementation returns the empty String. Subclasses may override.
- Specified by:
getLabel
in interfaceIUndoContext
- Returns:
- the label for the context.
-
matches
public boolean matches(IUndoContext context)
Return whether the specified context is considered a match for the receiving context. When a context matches another context, operations that have the context are considered to also have the matching context. The default implementation checks whether the supplied context is identical to this context. Subclasses may override.
- Specified by:
matches
in interfaceIUndoContext
- Parameters:
context
- the context to be checked against the receiving context.- Returns:
true
if the receiving context can be considered a match for the specified context, andfalse
if it cannot.
-
-