Runtime

## org.eclipse.gmf.runtime.diagram.ui
Class DiagramUtil

    java.lang.Object
      org.eclipse.gmf.runtime.diagram.ui.DiagramUtil

public class DiagramUtil
extends java.lang.Object

Provides miscellaneous diagram utilities

Constructor Summary
`DiagramUtil()`

Method Summary
`static IDiagramWorkbenchPart` `getOpenedDiagramEditor(Diagram diagram, IWorkbenchWindow window)` Rerturns an open editor for the given diagram in the given workbench window if the window is null, the active window in the platform is considered
`static void` `openDiagramEditor(Diagram diagram)` Opens an editor for a given diagram

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DiagramUtil

    public DiagramUtil()

Method Detail

### openDiagramEditor

    public static void openDiagramEditor(Diagram diagram)

  Opens an editor for a given diagram

  Parameters:
    `diagram` - The diagram to be opened

### getOpenedDiagramEditor

    public static IDiagramWorkbenchPart getOpenedDiagramEditor(Diagram diagram,
                                                               IWorkbenchWindow window)

  Rerturns an open editor for the given diagram in the given workbench window if the window is null, the active window in the platform is considered

  Parameters:
    `diagram` - The given diagram
    `window` - The given window (or null to mean the active one)
  Returns:
    An `IDiagramWorkbenchPart`

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.