de.cau.cs.kieler.core.model
Class GraphicalFrameworkService

java.lang.Object
  extended by de.cau.cs.kieler.core.model.GraphicalFrameworkService

public final class GraphicalFrameworkService
extends Object

A service for providing bridges to graphical editing frameworks.

Rating red

Field Summary
static String EXTENSION_POINT_ID
          the extension point identifier.
static String FW_GMF
          framework identifier for GMF.
static String FW_GRAPHITI
          framework identifier for Graphiti.
 
Method Summary
static boolean containsDiagram(IWorkbenchPart part)
          Tests whether the GraphicalFrameworkService instance can obtain Diagram data from the given WorkBenchPart (Editor or View).
 IGraphicalFrameworkBridge getBridge(Object object)
          Retrieve the first suitable graphical editing framework bridge for the given object.
static GraphicalFrameworkService getInstance()
          Returns the singleton instance.
 boolean isSupported(Object object)
          Check whether the given object is supported by any framework bridge.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FW_GMF

public static final String FW_GMF
framework identifier for GMF.

See Also:
Constant Field Values

FW_GRAPHITI

public static final String FW_GRAPHITI
framework identifier for Graphiti.

See Also:
Constant Field Values

EXTENSION_POINT_ID

public static final String EXTENSION_POINT_ID
the extension point identifier.

See Also:
Constant Field Values
Method Detail

getInstance

public static GraphicalFrameworkService getInstance()
Returns the singleton instance.

Returns:
the singleton instance

containsDiagram

public static boolean containsDiagram(IWorkbenchPart part)
Tests whether the GraphicalFrameworkService instance can obtain Diagram data from the given WorkBenchPart (Editor or View).

Parameters:
part - the corresponding WorkBenchPart, an Editor or View
Returns:
true iff a GraphicalFrameworkBridge is registered for the part and an EditPart can be obtained.

getBridge

public IGraphicalFrameworkBridge getBridge(Object object)
Retrieve the first suitable graphical editing framework bridge for the given object. If a string is passed, the framework bridge is selected by its registered identifier.

Parameters:
object - a framework identifier, or an edit part, editor part, or notational object
Returns:
the first suitable bridge
Throws:
UnsupportedPartException - if there is no bridge available for the given object

isSupported

public boolean isSupported(Object object)
Check whether the given object is supported by any framework bridge.

Parameters:
object - a framework identifier, or an edit part, editor part, or notational object
Returns:
true if the object is supported