|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.common.command.AbstractCommand
org.eclipse.emf.common.command.CompoundCommand
org.eclipse.gmf.runtime.lite.commands.DestroyElementCommand
public class DestroyElementCommand
Command that should be used to destroy an underlying model element for which
a notational element may be registered. It behaves effectively the same way
as the DeleteCommand
, but allows filtering of some references, so that they are not removed.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand |
---|
org.eclipse.emf.common.command.AbstractCommand.NonDirtying |
Field Summary | |
---|---|
protected Collection<?> |
collection
This is the collection of objects to be deleted. |
protected static String |
DESCRIPTION
|
protected org.eclipse.emf.edit.domain.EditingDomain |
domain
This is the editing doman in which this command operates. |
protected static String |
LABEL
|
Fields inherited from class org.eclipse.emf.common.command.CompoundCommand |
---|
commandList, LAST_COMMAND_ALL, MERGE_COMMAND_ALL, resultIndex |
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand |
---|
description, isExecutable, isPrepared, label |
Constructor Summary | |
---|---|
DestroyElementCommand(org.eclipse.emf.edit.domain.EditingDomain domain,
Collection<?> collection)
This constructs a command that deletes the objects in the given collection. |
|
DestroyElementCommand(org.eclipse.emf.edit.domain.EditingDomain domain,
org.eclipse.emf.edit.command.CommandParameter commandParameter)
This constructs a command that deletes the objects in the collection specified by the given command parameter. |
Method Summary | |
---|---|
static org.eclipse.emf.common.command.Command |
create(org.eclipse.emf.edit.domain.EditingDomain domain,
Collection<?> collection)
This creates a command that deletes the objects in the given collection. |
static org.eclipse.emf.common.command.Command |
create(org.eclipse.emf.edit.domain.EditingDomain domain,
Object object)
This creates a command that deletes the given object. |
void |
execute()
|
protected boolean |
prepare()
|
protected void |
prepareCommand()
|
protected boolean |
shouldRemoveReference(org.eclipse.emf.ecore.EStructuralFeature.Setting setting)
Returns whether value should be removed from the reference identified by the given setting. |
Methods inherited from class org.eclipse.emf.common.command.CompoundCommand |
---|
append, appendAndExecute, appendIfCanExecute, canUndo, dispose, getAffectedObjects, getCommandList, getDescription, getLabel, getMergedAffectedObjectsCollection, getMergedResultCollection, getResult, getResultIndex, isEmpty, redo, toString, undo, unwrap |
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand |
---|
canExecute, chain, setDescription, setLabel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected org.eclipse.emf.edit.domain.EditingDomain domain
protected Collection<?> collection
protected static final String LABEL
protected static final String DESCRIPTION
Constructor Detail |
---|
public DestroyElementCommand(org.eclipse.emf.edit.domain.EditingDomain domain, Collection<?> collection)
public DestroyElementCommand(org.eclipse.emf.edit.domain.EditingDomain domain, org.eclipse.emf.edit.command.CommandParameter commandParameter)
Method Detail |
---|
public static org.eclipse.emf.common.command.Command create(org.eclipse.emf.edit.domain.EditingDomain domain, Object object)
public static org.eclipse.emf.common.command.Command create(org.eclipse.emf.edit.domain.EditingDomain domain, Collection<?> collection)
protected boolean shouldRemoveReference(org.eclipse.emf.ecore.EStructuralFeature.Setting setting)
protected boolean prepare()
prepare
in class org.eclipse.emf.common.command.CompoundCommand
protected void prepareCommand()
public void execute()
execute
in interface org.eclipse.emf.common.command.Command
execute
in class org.eclipse.emf.common.command.CompoundCommand
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |