org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.util
Class IDEEditorUtil
java.lang.Object
org.eclipse.gmf.runtime.diagram.ui.resources.editor.util.EditorUtil
org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.util.IDEEditorUtil
public class IDEEditorUtil
- extends EditorUtil
Diagram utilities for IDE editors
Method Summary |
static IFile |
createAndOpenDiagram(DiagramFileCreator diagramFileCreator,
IPath containerPath,
java.lang.String fileName,
java.io.InputStream initialContents,
java.lang.String kind,
IWorkbenchWindow dWindow,
IProgressMonitor progressMonitor,
boolean openEditor,
boolean saveDiagram)
Create and open a diagram. |
static DiagramEditPart |
openDiagram(IFile file,
IWorkbenchWindow dWindow,
boolean saveDiagram,
IProgressMonitor progressMonitor)
Opens the diagram in an IEditorPart |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IDEEditorUtil
public IDEEditorUtil()
openDiagram
public static final DiagramEditPart openDiagram(IFile file,
IWorkbenchWindow dWindow,
boolean saveDiagram,
IProgressMonitor progressMonitor)
- Opens the diagram in an IEditorPart
- Parameters:
file
- IFile that contains the diagramdWindow
- the workbench windowsaveDiagram
- true to save the diagram after opening, false to not
save it.progressMonitor
- used when opening the diagram.
For now, it is only used when the diagram is being saved after opening.
- Returns:
- DiagramEditPart for the diagram opened in an IEditorPart.
createAndOpenDiagram
public static IFile createAndOpenDiagram(DiagramFileCreator diagramFileCreator,
IPath containerPath,
java.lang.String fileName,
java.io.InputStream initialContents,
java.lang.String kind,
IWorkbenchWindow dWindow,
IProgressMonitor progressMonitor,
boolean openEditor,
boolean saveDiagram)
- Create and open a diagram.
- Parameters:
diagramFileCreator
- that the new diagram is created from.containerPath
- IPath for the container of the diagram filefileName
- String of the name of the diagraminitialContents
- initial contents of the new diagram filekind
- String of the kind of diagram to createdWindow
- progressMonitor
- IProgressMonitor to use when creating the
new diagram and opening itopenEditor
- boolean true to open the editor after creating it,
false to not open it after creating itsaveDiagram
- boolean true to save the diagram after creating it
- Returns:
- IFile containing the created diagram
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.