Runtime

org.eclipse.gmf.runtime.emf.type.core.requests
Class ReorientRequest

java.lang.Object
  extended by org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest
      extended by org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest
All Implemented Interfaces:
IEditCommandRequest
Direct Known Subclasses:
ReorientReferenceRelationshipRequest, ReorientRelationshipRequest

public abstract class ReorientRequest
extends AbstractEditCommandRequest

Abstract request for changing the source or target of a relationship.


Field Summary
static int REORIENT_SOURCE
          Indicates that the source of the relationship will be changed.
static int REORIENT_TARGET
          Indicates that the target of the relationship will be changed.
 
Fields inherited from interface org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest
REPLACE_DEFAULT_COMMAND
 
Constructor Summary
protected ReorientRequest(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain, int direction, org.eclipse.emf.ecore.EObject newRelationshipEnd, org.eclipse.emf.ecore.EObject oldRelationshipEnd)
          Constructs a new request tof changing the source or target of a relationship.
 
Method Summary
protected  java.lang.String getDefaultLabel()
          Gets the default edit command label.
 int getDirection()
          Gets the value that indicates whether or not the source of the target of the relationship will be changed.
 org.eclipse.emf.ecore.EObject getNewRelationshipEnd()
          O Gets the new source or target.
 org.eclipse.emf.ecore.EObject getOldRelationshipEnd()
          Gets the old source or target.
 
Methods inherited from class org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest
addParameters, getClientContext, getEditingDomain, getElementsToEdit, 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
 
Methods inherited from interface org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest
getEditHelperContext
 

Field Detail

REORIENT_SOURCE

public static final int REORIENT_SOURCE
Indicates that the source of the relationship will be changed.

See Also:
Constant Field Values

REORIENT_TARGET

public static final int REORIENT_TARGET
Indicates that the target of the relationship will be changed.

See Also:
Constant Field Values
Constructor Detail

ReorientRequest

protected ReorientRequest(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain,
                          int direction,
                          org.eclipse.emf.ecore.EObject newRelationshipEnd,
                          org.eclipse.emf.ecore.EObject oldRelationshipEnd)
Constructs a new request tof changing the source or target of a relationship.

Parameters:
editingDomain - the editing domain in which I am requesting to make model
direction - Indicates whether or not the source of the target of the relationship will be changed. One of REORIENT_SOURCE or REORIENT_TARGET.
newRelationshipEnd - the new source or target
oldRelationshipEnd - the old source or target
Method Detail

getDirection

public int getDirection()
Gets the value that indicates whether or not the source of the target of the relationship will be changed. One of REORIENT_SOURCEor REORIENT_TARGET.

Returns:
one of REORIENT_SOURCEor REORIENT_TARGET.

getNewRelationshipEnd

public org.eclipse.emf.ecore.EObject getNewRelationshipEnd()
O Gets the new source or target.

Returns:
the new source or target

getOldRelationshipEnd

public org.eclipse.emf.ecore.EObject getOldRelationshipEnd()
Gets the old source or target.

Returns:
the old source or target

getDefaultLabel

protected java.lang.String getDefaultLabel()
Description copied from class: AbstractEditCommandRequest
Gets the default edit command label.

Overrides:
getDefaultLabel in class AbstractEditCommandRequest
Returns:
the default label

Runtime

Guidelines for using Eclipse APIs.

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