org.eclipse.emf.mapping.command
Class MatchMappingCommand
java.lang.Object
org.eclipse.emf.common.command.AbstractCommand
org.eclipse.emf.common.command.CompoundCommand
org.eclipse.emf.mapping.command.MatchMappingCommand
- All Implemented Interfaces:
- Command
- Direct Known Subclasses:
- NameMatchMappingCommand, TypeMatchMappingCommand
- public abstract class MatchMappingCommand
- extends CompoundCommand
Field Summary |
protected static String |
DESCRIPTION
This cachaes the description. |
protected MappingDomain |
domain
This keeps track of the mapping domain in which the command operates. |
protected static String |
LABEL
This caches the label. |
protected Collection |
mappedInputs
This is the collection of inputs that have been matched by this command |
protected Mapping |
mapping
This is the mapping that is being recursively matched. |
Methods inherited from class org.eclipse.emf.common.command.CompoundCommand |
append, appendAndExecute, appendIfCanExecute, canUndo, dispose, execute, getAffectedObjects, getCommandList, getDescription, getLabel, getMergedAffectedObjectsCollection, getMergedResultCollection, getResult, getResultIndex, isEmpty, redo, undo, unwrap |
domain
protected MappingDomain domain
- This keeps track of the mapping domain in which the command operates.
mapping
protected Mapping mapping
- This is the mapping that is being recursively matched.
mappedInputs
protected Collection mappedInputs
- This is the collection of inputs that have been matched by this command
LABEL
protected static final String LABEL
- This caches the label.
DESCRIPTION
protected static final String DESCRIPTION
- This cachaes the description.
MatchMappingCommand
public MatchMappingCommand(MappingDomain domain,
Mapping mapping)
prepare
protected boolean prepare()
- Description copied from class:
CompoundCommand
- Returns whether all the commands can execute so that
AbstractCommand.isExecutable
can be cached.
An empty command list causes false
to be returned.
- Overrides:
prepare
in class CompoundCommand
- Returns:
- whether all the commands can execute.
matchChildren
protected void matchChildren(Collection inputChildren,
Collection outputChildren)
match
protected abstract boolean match(Object inputObject,
Object outputObject,
Collection mappedObjects)
toString
public String toString()
- This gives an abbreviated name using this object's own class' name, without package qualification,
followed by a space separated list of field:value pairs.
- Overrides:
toString
in class CompoundCommand