|
UML Modeling Layer | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.xtools.umlviz.ui.UMLDiagramResourceUtil
public final class UMLDiagramResourceUtil
A utility class that exposes UML diagram resource lifecycle operations and provides access to the modeling platform.
API clients should not instantiate this class.
| Method Summary | |
|---|---|
static void |
closeDiagram(Diagram diagram)
Closes the diagram specified by diagram |
static Diagram |
createDiagram(String file,
UMLDiagramKind umlDiagramKind)
Creates a visualization diagram given a file path |
static Diagram |
createDiagram(URI uri,
UMLDiagramKind umlDiagramKind)
Creates a visualization diagram given a URI |
static EditingDomain |
getCompatibilityEditingDomain()
Deprecated. use the UMLDiagramResourceUtil.getEditingDomain() method, instead |
static TransactionalEditingDomain |
getEditingDomain()
Returns the UMLModeler's EditingDomain. |
static 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 Diagram |
openDiagram(String file)
Opens the visualization diagram whose filename is described by file. |
static Diagram |
openDiagram(URI uri)
Opens the visualization diagram whose URI is described by uri. |
static void |
saveDiagram(Diagram diagram)
Saves the visualization diagram specified by diagram. |
static void |
saveDiagramAs(Diagram diagram,
String file)
Saves the diagram specified by diagram to the location
specified by file |
static void |
saveDiagramAs(Diagram diagram,
URI uri)
Saves the diagram specified by diagram to the location
specified by uri |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static IEObjectHelper getEObjectHelper()
EMFCoreUtil
API. See IEObjectHelper's individual method documentation for details.
EObject
IEObjectHelperpublic static IUMLUIHelper getUMLUIHelper()
Element
IUMLUIHelperpublic static IUMLDiagramHelper getUMLDiagramHelper()
View
IUMLDiagramHelperpublic static TransactionalEditingDomain getEditingDomain()
EditingDomainpublic static EditingDomain getCompatibilityEditingDomain()
UMLDiagramResourceUtil.getEditingDomain() method, instead
EditingDomain
public static Diagram createDiagram(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_LITERAL
IllegalArgumentException - file is an empty string file
specifies a filename with an invalid extension
umlDiagramKind is unsupported
NullPointerException - file or umlDiagramKind is
null
public static Diagram createDiagram(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_LITERAL
IllegalArgumentException - uri specifies a filename with an invalid
extension umlDiagramKind is unsupported
NullPointerException - uri or umlDiagramKind is
null
public static Diagram openDiagram(String file)
throws IOException
file.
file - The diagram file to open
IOException - The file specified by file could not be found
or the file is corrupted or could not be opened
IllegalArgumentException - file is an empty string
NullPointerException - file is null
public static Diagram openDiagram(URI uri)
throws IOException
uri.
uri - The URI of the diagram to open
IOException - The file specified by URI could not be found
or the file is corrupted or could not be opened
NullPointerException - uri is null
public static void saveDiagram(Diagram diagram)
throws IOException
diagram.
diagram - The visualization diagram to save
IOException - The location specified by the root path of
diagram cannot be used to save the diagram
IllegalArgumentException - diagram has no associated resource (
public static void saveDiagramAs(Diagram diagram,
String file)
throws IOException
diagram to the location
specified by file
diagram - The diagram to savefile - The location to save the diagram
IOException - The location specified by file cannot be used
to save the diagram
IllegalArgumentException - diagram has no associated resource (
file is empty
public static void saveDiagramAs(Diagram diagram,
URI uri)
throws IOException
diagram to the location
specified by uri
diagram - The diagram to saveuri - The URI location to save the diagram
IOException - The location specified by uri cannot be used
to save the diagram
IllegalArgumentException - diagram has no associated resourcepublic static void closeDiagram(Diagram diagram)
diagram
diagram - The diagram to close
IllegalArgumentException - diagram has no associated resource (
|
UML Modeling Layer | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||