|
Runtime | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest
org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest
org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest
public class DestroyElementRequest
Request to destroy a model element.
| Field Summary | |
|---|---|
static java.lang.String |
DESTROY_DEPENDENTS_REQUEST_PARAMETER
Request parameter specifying the associated destroy-dependents request that is propagated recursively through the processing of destroy requests for an element, its contents, and its dependents. |
static java.lang.String |
INITIAL_ELEMENT_TO_DESTROY_PARAMETER
Request parameter specifying the initial element that was requested to be destroyed. |
| Fields inherited from interface org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest |
|---|
REPLACE_DEFAULT_COMMAND |
| Constructor Summary | |
|---|---|
DestroyElementRequest(boolean confirmationRequired)
Constructs a new request to destroy a model element. |
|
DestroyElementRequest(EObject elementToDestroy,
boolean confirmationRequired)
Constructs a new request to destroy a model element. |
|
DestroyElementRequest(TransactionalEditingDomain editingDomain,
boolean confirmationRequired)
Constructs a new request to destroy a model element. |
|
DestroyElementRequest(TransactionalEditingDomain editingDomain,
EObject elementToDestroy,
boolean confirmationRequired)
Constructs a new request to destroy a model element. |
|
| Method Summary | |
|---|---|
DestroyElementCommand |
getBasicDestroyCommand()
Obtains a command to override the basic destroy command that would be created by default by the edit helper to perform the object destruction. |
EObject |
getContainer()
Gets the container of the element to be destroyed. |
java.lang.Object |
getEditHelperContext()
Extends the inherited method to return the default element type when destroying a root element of a resource. |
TransactionalEditingDomain |
getEditingDomain()
Derives the editing domain from the object to be destroyed, if it hasn't already been specified. |
EObject |
getElementToDestroy()
Gets the element to be destroyed. |
void |
setBasicDestroyCommand(DestroyElementCommand command)
Assigns a command to override the basic destroy command that would be created by default by the edit helper to perform the object destruction. |
void |
setElementToDestroy(EObject elementToDestroy)
Sets the element to be destroyed. |
| Methods inherited from class org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest |
|---|
getDefaultLabel, getElementsToEdit, isConfirmationRequired, setConfirm |
| Methods inherited from class org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest |
|---|
addParameters, getClientContext, getLabel, getParameter, getParameters, setClientContext, setEditingDomain, setLabel, setParameter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DESTROY_DEPENDENTS_REQUEST_PARAMETER
The expected parameter value is an instance of type DestroyDependentsRequest.
public static final java.lang.String INITIAL_ELEMENT_TO_DESTROY_PARAMETER
The expected parameter value is an instance of type EObject, or
null.
| Constructor Detail |
|---|
public DestroyElementRequest(TransactionalEditingDomain editingDomain,
boolean confirmationRequired)
editingDomain - the editing domain in which I am requesting to make modelconfirmationRequired - true if the user should be prompted to confirm
the element deletion, false otherwise.
public DestroyElementRequest(TransactionalEditingDomain editingDomain,
EObject elementToDestroy,
boolean confirmationRequired)
editingDomain - the editing domain in which I am requesting to make modelelementToDestroy - the element to be destroyedconfirmationRequired - true if the user should be prompted to confirm
the element deletion, false otherwise.public DestroyElementRequest(boolean confirmationRequired)
getElementToDestroy().
confirmationRequired - true if the user should be prompted to confirm
the element deletion, false otherwise.
public DestroyElementRequest(EObject elementToDestroy,
boolean confirmationRequired)
elementToDestroy - the element to be destroyedconfirmationRequired - true if the user should be prompted to confirm
the element deletion, false otherwise.| Method Detail |
|---|
public EObject getElementToDestroy()
public void setElementToDestroy(EObject elementToDestroy)
elementToDestroy - the element to be destroyedpublic EObject getContainer()
DestroyRequest
getContainer in class DestroyRequestpublic java.lang.Object getEditHelperContext()
getEditHelperContext in interface IEditCommandRequestgetEditHelperContext in class DestroyRequestpublic TransactionalEditingDomain getEditingDomain()
getEditingDomain in interface IEditCommandRequestgetEditingDomain in class AbstractEditCommandRequestpublic void setBasicDestroyCommand(DestroyElementCommand command)
This is similar to the facility provided via the
IEditCommandRequest.REPLACE_DEFAULT_COMMAND parameter for
indicating that an advice has taken over the "instead" command, except
that this is applies only to the basic single-object destruction, whereas
the edit helper's command also performs recursion and destruction of
dependents.
command - the basic destroy command to use for destruction of an
element, or null to use the edit helper's default
implementationAbstractEditHelper#getBasicDestroyElementCommand(DestroyElementRequest)public DestroyElementCommand getBasicDestroyCommand()
null to use the edit helper's default
implementationsetBasicDestroyCommand(DestroyElementCommand),
AbstractEditHelper#getBasicDestroyElementCommand(DestroyElementRequest)
|
Runtime | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.