public final class UMLDiagramResourceUtil
extends java.lang.Object
API clients should not instantiate this class.
| Modifier and Type | Method and Description |
|---|---|
static void |
closeDiagram(org.eclipse.gmf.runtime.notation.Diagram diagram)
Closes the diagram specified by
diagram |
static org.eclipse.gmf.runtime.notation.Diagram |
createDiagram(java.lang.String file,
UMLDiagramKind umlDiagramKind)
Creates a visualization diagram given a file path
|
static org.eclipse.gmf.runtime.notation.Diagram |
createDiagram(org.eclipse.emf.common.util.URI uri,
UMLDiagramKind umlDiagramKind)
Creates a visualization diagram given a URI
|
static com.ibm.xtools.emf.msl.EditingDomain |
getCompatibilityEditingDomain()
Deprecated.
use the
getEditingDomain() method, instead |
static org.eclipse.emf.transaction.TransactionalEditingDomain |
getEditingDomain()
Returns the UMLModeler's EditingDomain.
|
static com.ibm.xtools.emf.msl.IEObjectHelper |
getEObjectHelper()
Deprecated.
IEObjectHelper is mostly obsoleted by the
EMFCoreUtil
API. See IEObjectHelper's individual method documentation for details. |
static IUMLDiagramHelper |
getUMLDiagramHelper()
Returns a user helper to work with classes implementing
View |
static IUMLUIHelper |
getUMLUIHelper()
Returns a user interface helper to work with classes implementing
Element |
static org.eclipse.gmf.runtime.notation.Diagram |
openDiagram(java.lang.String file)
Opens the visualization diagram whose filename is described by
file. |
static org.eclipse.gmf.runtime.notation.Diagram |
openDiagram(org.eclipse.emf.common.util.URI uri)
Opens the visualization diagram whose URI is described by
uri. |
static void |
saveDiagram(org.eclipse.gmf.runtime.notation.Diagram diagram)
Saves the visualization diagram specified by
diagram. |
static void |
saveDiagramAs(org.eclipse.gmf.runtime.notation.Diagram diagram,
java.lang.String file)
Saves the diagram specified by
diagram to the location
specified by file |
static void |
saveDiagramAs(org.eclipse.gmf.runtime.notation.Diagram diagram,
org.eclipse.emf.common.util.URI uri)
Saves the diagram specified by
diagram to the location
specified by uri |
public static com.ibm.xtools.emf.msl.IEObjectHelper getEObjectHelper()
EMFCoreUtil
API. See IEObjectHelper's individual method documentation for details.EObjectIEObjectHelperpublic static IUMLUIHelper getUMLUIHelper()
ElementIUMLUIHelperpublic static IUMLDiagramHelper getUMLDiagramHelper()
ViewIUMLDiagramHelperpublic static org.eclipse.emf.transaction.TransactionalEditingDomain getEditingDomain()
EditingDomainpublic static com.ibm.xtools.emf.msl.EditingDomain getCompatibilityEditingDomain()
getEditingDomain() method, insteadEditingDomainpublic static org.eclipse.gmf.runtime.notation.Diagram createDiagram(java.lang.String file,
UMLDiagramKind umlDiagramKind)
file - The diagram file to create, an extension will be added if not
providedumlDiagramKind - The kind of diagram to create, the only currently supported
type is CLASS_LITERALjava.lang.IllegalArgumentException - file is an empty string file
specifies a filename with an invalid extension
umlDiagramKind is unsupportedjava.lang.NullPointerException - file or umlDiagramKind is
nullpublic static org.eclipse.gmf.runtime.notation.Diagram createDiagram(org.eclipse.emf.common.util.URI uri,
UMLDiagramKind umlDiagramKind)
uri - The URI of the diagram to create, an extension will be added
if not providedumlDiagramKind - The kind of diagram to create, the only currently supported
type is CLASS_LITERALjava.lang.IllegalArgumentException - uri specifies a filename with an invalid
extension umlDiagramKind is unsupportedjava.lang.NullPointerException - uri or umlDiagramKind is
nullpublic static org.eclipse.gmf.runtime.notation.Diagram openDiagram(java.lang.String file)
throws java.io.IOException
file.file - The diagram file to openjava.io.IOException - The file specified by file could not be found
or the file is corrupted or could not be openedjava.lang.IllegalArgumentException - file is an empty stringjava.lang.NullPointerException - file is nullpublic static org.eclipse.gmf.runtime.notation.Diagram openDiagram(org.eclipse.emf.common.util.URI uri)
throws java.io.IOException
uri.uri - The URI of the diagram to openjava.io.IOException - The file specified by URI could not be found
or the file is corrupted or could not be openedjava.lang.NullPointerException - uri is nullpublic static void saveDiagram(org.eclipse.gmf.runtime.notation.Diagram diagram)
throws java.io.IOException
diagram.diagram - The visualization diagram to savejava.io.IOException - The location specified by the root path of
diagram cannot be used to save the diagramjava.lang.IllegalArgumentException - diagram has no associated resource (public static void saveDiagramAs(org.eclipse.gmf.runtime.notation.Diagram diagram,
java.lang.String file)
throws java.io.IOException
diagram to the location
specified by filediagram - The diagram to savefile - The location to save the diagramjava.io.IOException - The location specified by file cannot be used
to save the diagramjava.lang.IllegalArgumentException - diagram has no associated resource (
file is emptypublic static void saveDiagramAs(org.eclipse.gmf.runtime.notation.Diagram diagram,
org.eclipse.emf.common.util.URI uri)
throws java.io.IOException
diagram to the location
specified by uridiagram - The diagram to saveuri - The URI location to save the diagramjava.io.IOException - The location specified by uri cannot be used
to save the diagramjava.lang.IllegalArgumentException - diagram has no associated resourcepublic static void closeDiagram(org.eclipse.gmf.runtime.notation.Diagram diagram)
diagramdiagram - The diagram to closejava.lang.IllegalArgumentException - diagram has no associated resource (