com.ibm.jps.util
Class RSMDiagram

java.lang.Object
  extended by com.ibm.jps.util.RSMDiagram

public class RSMDiagram
extends java.lang.Object

Contains utilities to manipulate UML diagrams


Constructor Summary
RSMDiagram()
           
 
Method Summary
static org.eclipse.gmf.runtime.notation.Diagram findDiagram(org.eclipse.uml2.uml.Namespace inNS, java.lang.String inDiagName, com.ibm.xtools.umlnotation.UMLDiagramKind inKind)
          Retrieves a specific diagram from the specified namespace.
static org.eclipse.gmf.runtime.notation.Node findNode(org.eclipse.gmf.runtime.notation.Diagram inDiag, org.eclipse.uml2.uml.Element inElt)
          Retrieves in the input diagram the node corresponding to the input UML element.
static java.util.List<org.eclipse.gmf.runtime.notation.View> findViews(org.eclipse.emf.ecore.EObject inContainer, org.eclipse.uml2.uml.Element inRef)
          Returns a list of Views contained in the specified container and corresponding to the input UML element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RSMDiagram

public RSMDiagram()
Method Detail

findDiagram

public static org.eclipse.gmf.runtime.notation.Diagram findDiagram(org.eclipse.uml2.uml.Namespace inNS,
                                                                   java.lang.String inDiagName,
                                                                   com.ibm.xtools.umlnotation.UMLDiagramKind inKind)
Retrieves a specific diagram from the specified namespace.

Parameters:
inNS - The namespace to search
inDiagName - The name of the diagram
inKind - The diagram kind (e.g. UMLDiagramKind.CLASS_LITERAL)
Returns:
The found diagram or null

findNode

public static org.eclipse.gmf.runtime.notation.Node findNode(org.eclipse.gmf.runtime.notation.Diagram inDiag,
                                                             org.eclipse.uml2.uml.Element inElt)
Retrieves in the input diagram the node corresponding to the input UML element. If the diagram contains several nodes pointing to the same element, only the first one is returned.

Parameters:
inDiag - The diagram to search
inElt - The UML element that the node is pointing to
Returns:
The node matching the input element

findViews

public static java.util.List<org.eclipse.gmf.runtime.notation.View> findViews(org.eclipse.emf.ecore.EObject inContainer,
                                                                              org.eclipse.uml2.uml.Element inRef)
Returns a list of Views contained in the specified container and corresponding to the input UML element.

Parameters:
inContainer - The input container
inRef - The referenced UML element
Returns:
The list of Views matching the input UML element