Runtime

## org.eclipse.gmf.runtime.emf.type.core.requests
Class DestroyReferenceRequest

    java.lang.Object
      org.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.DestroyReferenceRequest

All Implemented Interfaces:
  IEditCommandRequest

public class DestroyReferenceRequest
extends DestroyRequest

Request to destroy a reference from one model element to another.

Field Summary

Fields inherited from interface org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest
`REPLACE_DEFAULT_COMMAND`

Constructor Summary
`DestroyReferenceRequest(EObject container, EReference containingFeature, EObject referencedObject, boolean confirmationRequired)` Constructs a new request to destroy a reference from one model element to another.
`DestroyReferenceRequest(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain, EObject container, EReference containingFeature, EObject referencedObject, boolean confirmationRequired)` Constructs a new request to destroy a reference from one model element to another.

Method Summary
`EObject` `getContainer()` Gets the container of the element to be destroyed.
`EReference` `getContainingFeature()` Gets the feature in the `container` that contains the reference.
`EObject` `getReferencedObject()` Gets the referenced element.
`void` `setContainer(EObject container)` Sets the element that contains the reference.
`void` `setContainingFeature(EReference containingFeature)` Sets the feature in the `container` that contains the reference.
`void` `setReferencedObject(EObject referencedObject)` Sets the referenced element.

Methods inherited from class org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest
`getDefaultLabel, getEditHelperContext, getElementsToEdit, isConfirmationRequired, setConfirm`

Methods inherited from class org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest
`addParameters, getClientContext, getEditingDomain, 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`

Constructor Detail

### DestroyReferenceRequest

    public DestroyReferenceRequest(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain,
                                   EObject container,
                                   EReference containingFeature,
                                   EObject referencedObject,
                                   boolean confirmationRequired)

  Constructs a new request to destroy a reference from one model element to another.

Parameters:
  `editingDomain` - the editing domain in which I am requesting to make model
  `container` - the element that contains the reference
  `containingFeature` - the feature in `container` that contains the reference
  `referencedObject` - the referenced object
  `confirmationRequired` - `true` if the user should be prompted to confirm the element deletion, `false` otherwise.

### DestroyReferenceRequest

    public DestroyReferenceRequest(EObject container,
                                   EReference containingFeature,
                                   EObject referencedObject,
                                   boolean confirmationRequired)

  Constructs a new request to destroy a reference from one model element to another. The editing domain is derived from the `container`.

Parameters:
  `container` - the element that contains the reference
  `containingFeature` - the feature in `container` that contains the reference
  `referencedObject` - the referenced object
  `confirmationRequired` - `true` if the user should be prompted to confirm the element deletion, `false` otherwise.

Method Detail

### getContainer

    public EObject getContainer()

  Description copied from class: `DestroyRequest`
  Gets the container of the element to be destroyed.

  Specified by:
    `getContainer` in class `DestroyRequest`
  Returns:
    the container of the element to be destroyed

### setContainer

    public void setContainer(EObject container)

  Sets the element that contains the reference.

  Parameters:
    `container` - the element that contains the reference

### getContainingFeature

    public EReference getContainingFeature()

  Gets the feature in the `container` that contains the reference.

  Returns:
    the feature in the `container` that contains the reference

### setContainingFeature

    public void setContainingFeature(EReference containingFeature)

  Sets the feature in the `container` that contains the reference.

  Parameters:
    `containingFeature` - the feature in the `container` that contains the reference

### getReferencedObject

    public EObject getReferencedObject()

  Gets the referenced element.

  Returns:
    the referenced element

### setReferencedObject

    public void setReferencedObject(EObject referencedObject)

  Sets the referenced element.

  Parameters:
    `referencedObject` - the referenced element

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.