de.cau.cs.kieler.papyrus
Class PapyrusFrameworkBridge

java.lang.Object
  extended by de.cau.cs.kieler.core.model.gmf.GmfFrameworkBridge
      extended by de.cau.cs.kieler.papyrus.PapyrusFrameworkBridge
All Implemented Interfaces:
IGraphicalFrameworkBridge

public class PapyrusFrameworkBridge
extends GmfFrameworkBridge

An extension of the GMF editing bridge for Papyrus multi-page editors.

Rating red

Constructor Summary
PapyrusFrameworkBridge()
           
 
Method Summary
 EditPart getEditPart(IWorkbenchPart workbenchPart, Object object)
          Returns the relevant edit part for the given object.
 EditPart getEditPart(Object object)
          Returns the relevant edit part for the given object.
 ISelection getSelection(IWorkbenchPart workbenchPart)
          Returns the current selection for the given editor part.
 boolean supports(Object object)
          Determine whether this bridge supports the given object.
 
Methods inherited from class de.cau.cs.kieler.core.model.gmf.GmfFrameworkBridge
getDiagramEditPart, getDrawingLayer, getEditingDomain, getEditPart, getEditPart, getElement, getNotationElement, getZoomManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PapyrusFrameworkBridge

public PapyrusFrameworkBridge()
Method Detail

supports

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

Specified by:
supports in interface IGraphicalFrameworkBridge
Overrides:
supports in class GmfFrameworkBridge
Parameters:
object - an edit part, editor part, or notational object
Returns:
true if this bridge supports the given object

getEditPart

public 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.

Specified by:
getEditPart in interface IGraphicalFrameworkBridge
Overrides:
getEditPart in class GmfFrameworkBridge
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

public EditPart getEditPart(IWorkbenchPart workbenchPart,
                            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.

Specified by:
getEditPart in interface IGraphicalFrameworkBridge
Overrides:
getEditPart in class GmfFrameworkBridge
Parameters:
workbenchPart - 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

getSelection

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

Specified by:
getSelection in interface IGraphicalFrameworkBridge
Overrides:
getSelection in class GmfFrameworkBridge
Parameters:
workbenchPart - a workbench part containing a diagram
Returns:
the current selection, or null if the selection cannot be determined