de.cau.cs.kieler.core.model
Interface IGraphicalFrameworkBridge

All Known Implementing Classes:
GmfFrameworkBridge, GraphitiFrameworkBridge, PapyrusFrameworkBridge

public interface IGraphicalFrameworkBridge

Interface for bridges to graphical editing frameworks. This can be used to connect code that is independent of specific editor frameworks to frameworks such as GMF.

Rating red

Method Summary
 IFigure getDrawingLayer(EditPart editPart)
          Returns a layer figure for the associated diagram that can be used to draw additional information.
 EditingDomain getEditingDomain(Object object)
          Retrieve the editing domain for model changes of the given object.
 EditPart getEditPart(IWorkbenchPart editorPart, Object object)
          Returns the relevant edit part for the given object.
 EditPart getEditPart(Object object)
          Returns the relevant edit part for the given object.
 EObject getElement(Object object)
          Retrieve the domain model element from the given object.
 EObject getNotationElement(Object object)
          Retrieve the notational model element from the given object.
 ISelection getSelection(IWorkbenchPart workbenchPart)
          Returns the current selection for the given editor part.
 ZoomManager getZoomManager(EditPart editPart)
          Returns a zoom manager for the associated diagram.
 boolean supports(Object object)
          Determine whether this bridge supports the given object.
 

Method Detail

supports

boolean supports(Object object)
Determine whether this bridge supports the given object.

Parameters:
object - an edit part, editor part, or notational object
Returns:
true if this bridge supports the given object

getElement

EObject getElement(Object object)
Retrieve the domain model element from the given object.

Parameters:
object - a selectable object, such as an edit part
Returns:
the domain model element, or null if there is none

getNotationElement

EObject getNotationElement(Object object)
Retrieve the notational model element from the given object. The kind of notational element depends on the specific graphical framework.

Parameters:
object - a selectable object, such as an edit part
Returns:
the notational model element, or null if there is none

getEditPart

EditPart getEditPart(Object object)
Returns the relevant edit part for the given object. If a diagram editor part is passed, then the return value is the corresponding diagram edit part. If an edit part is passed, it is filtered in such a way that the most relevant related edit part is returned; e.g. for a compartment edit part the containing node edit part is returned. If a model element is passed, the most relevant edit part in the active editor is returned.

Parameters:
object - an editor part, edit part, notational object, or model element
Returns:
the relevant edit part, or null if the passed object cannot be handled

getEditPart

EditPart getEditPart(IWorkbenchPart editorPart,
                     Object object)
Returns the relevant edit part for the given object. If a model element is passed, the most relevant edit part in the given editor is returned.

Parameters:
editorPart - a workbench part containing a diagram
object - an edit part, notational object, or model element
Returns:
the relevant edit part, or null if the passed object cannot be handled

getEditingDomain

EditingDomain getEditingDomain(Object object)
Retrieve the editing domain for model changes of the given object.

Parameters:
object - a selectable object, such as an edit part
Returns:
the transactional editing domain, or null if there is none

getDrawingLayer

IFigure getDrawingLayer(EditPart editPart)
Returns a layer figure for the associated diagram that can be used to draw additional information.

Parameters:
editPart - an edit part from a graphical diagram
Returns:
a drawing layer

getZoomManager

ZoomManager getZoomManager(EditPart editPart)
Returns a zoom manager for the associated diagram.

Parameters:
editPart - an edit part from a graphical diagram
Returns:
a zoom manager

getSelection

ISelection getSelection(IWorkbenchPart workbenchPart)
Returns the current selection for the given editor part.

Parameters:
workbenchPart - a workbench part containing a diagram
Returns:
the current selection, or null if the selection cannot be determined