|
||||||||||||
| 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.emf.edit.command.DeleteCommand
This uses one or more RemoveCommands to remove an object from its parent container and to delete all other
references to it from within the editing domain.
| Nested Class Summary |
|---|
| Nested classes inherited from class org.eclipse.emf.common.command.AbstractCommand |
|---|
AbstractCommand.NonDirtying |
| Field Summary | |
|---|---|
protected java.util.Collection |
collection
This is the collection of objects to be deleted. |
protected static java.lang.String |
DESCRIPTION
This caches the description. |
protected EditingDomain |
domain
This is the editing doman in which this command operates. |
protected static java.lang.String |
LABEL
This caches the 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 | |
|---|---|
DeleteCommand(EditingDomain domain,
java.util.Collection collection)
This constructs a command that deletes the objects in the given collection. |
|
| Method Summary | |
|---|---|
static Command |
create(EditingDomain domain,
java.util.Collection collection)
This creates a command that deletes the objects in the given collection. |
static Command |
create(EditingDomain domain,
java.lang.Object object)
This creates a command that deletes the given object. |
void |
execute()
Calls Command.execute() for each command in the list. |
java.util.Collection |
getCollection()
This returns the collection of objects to be deleted. |
protected boolean |
prepare()
Returns whether all the commands can execute so that AbstractCommand.isExecutable can be cached.
|
| 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 static final java.lang.String LABEL
protected static final java.lang.String DESCRIPTION
protected EditingDomain domain
protected java.util.Collection collection
| Constructor Detail |
public DeleteCommand(EditingDomain domain,
java.util.Collection collection)
| Method Detail |
public static Command create(EditingDomain domain,
java.lang.Object object)
public static Command create(EditingDomain domain,
java.util.Collection collection)
public java.util.Collection getCollection()
protected boolean prepare()
CompoundCommandAbstractCommand.isExecutable can be cached.
An empty command list causes false to be returned.
prepare in class CompoundCommandpublic void execute()
CompoundCommandCommand.execute() for each command in the list.
execute in interface Commandexecute in class CompoundCommand
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||