org.eclipse.emf.ecoretools.diagram.part
Class EcoreDiagramEditorUtil
java.lang.Object
org.eclipse.emf.ecoretools.diagram.part.EcoreDiagramEditorUtil
public class EcoreDiagramEditorUtil
- extends java.lang.Object
Method Summary |
static org.eclipse.emf.ecore.resource.Resource |
createDiagram(org.eclipse.emf.common.util.URI diagramURI,
org.eclipse.emf.common.util.URI modelURI,
org.eclipse.core.runtime.IProgressMonitor progressMonitor)
This method should be called within a workspace modify operation since it
creates resources. |
static org.eclipse.emf.ecore.resource.Resource |
createDiagramOnly(org.eclipse.emf.common.util.URI diagramURI,
org.eclipse.emf.common.util.URI modelURI,
org.eclipse.emf.ecore.EObject domainElement,
boolean initializeDiagram,
org.eclipse.core.runtime.IProgressMonitor progressMonitor)
This method should be called within a workspace modify operation since it
creates resources. |
static org.eclipse.gmf.runtime.notation.View |
findView(org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart diagramEditPart,
org.eclipse.emf.ecore.EObject targetElement,
EcoreDiagramEditorUtil.LazyElement2ViewMap lazyElement2ViewMap)
|
static java.util.Map<java.lang.String,java.lang.String> |
getSaveOptions()
|
static java.lang.String |
getUniqueFileName(org.eclipse.core.runtime.IPath containerFullPath,
java.lang.String fileName,
java.lang.String extension)
|
static boolean |
openDiagram(org.eclipse.emf.ecore.resource.Resource diagram)
|
static void |
runWizard(org.eclipse.swt.widgets.Shell shell,
org.eclipse.jface.wizard.Wizard wizard,
java.lang.String settingsKey)
Runs the wizard in a dialog. |
static void |
selectElementsInDiagram(org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart diagramPart,
java.util.List editParts)
|
static void |
setCharset(org.eclipse.core.resources.IFile file)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EcoreDiagramEditorUtil
public EcoreDiagramEditorUtil()
getSaveOptions
public static java.util.Map<java.lang.String,java.lang.String> getSaveOptions()
openDiagram
public static boolean openDiagram(org.eclipse.emf.ecore.resource.Resource diagram)
throws org.eclipse.ui.PartInitException
- Throws:
org.eclipse.ui.PartInitException
setCharset
public static void setCharset(org.eclipse.core.resources.IFile file)
getUniqueFileName
public static java.lang.String getUniqueFileName(org.eclipse.core.runtime.IPath containerFullPath,
java.lang.String fileName,
java.lang.String extension)
runWizard
public static void runWizard(org.eclipse.swt.widgets.Shell shell,
org.eclipse.jface.wizard.Wizard wizard,
java.lang.String settingsKey)
- Runs the wizard in a dialog.
createDiagram
public static org.eclipse.emf.ecore.resource.Resource createDiagram(org.eclipse.emf.common.util.URI diagramURI,
org.eclipse.emf.common.util.URI modelURI,
org.eclipse.core.runtime.IProgressMonitor progressMonitor)
- This method should be called within a workspace modify operation since it
creates resources.
createDiagramOnly
public static org.eclipse.emf.ecore.resource.Resource createDiagramOnly(org.eclipse.emf.common.util.URI diagramURI,
org.eclipse.emf.common.util.URI modelURI,
org.eclipse.emf.ecore.EObject domainElement,
boolean initializeDiagram,
org.eclipse.core.runtime.IProgressMonitor progressMonitor)
- This method should be called within a workspace modify operation since it
creates resources.
Updated : here we only need to create the diagram resource, the
domain resource already exist, we just load it
- Parameters:
diagramURI
- the diagram model EMF URImodelURI
- the domain model EMF URIdomainElement
- the domain element that should be associated with the DiagraminitializeDiagram
- indicate whether the diagram should be initialized with domain
contentsprogressMonitor
- the progressMonitor
- Returns:
- Resource the diagram resource
selectElementsInDiagram
public static void selectElementsInDiagram(org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart diagramPart,
java.util.List editParts)
findView
public static org.eclipse.gmf.runtime.notation.View findView(org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart diagramEditPart,
org.eclipse.emf.ecore.EObject targetElement,
EcoreDiagramEditorUtil.LazyElement2ViewMap lazyElement2ViewMap)