|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.core.model.gmf.util.GmfModelingUtil
public final class GmfModelingUtil
Utility class with static methods to handle EMF models and GEF EditParts.
Method Summary | ||
---|---|---|
static Collection<EObject> |
getAllByType(EClassifier eObjectClass,
EditPart rootEditPart)
Get all objects that are direct or indirect children of the given root EObject corresponding to the given EditPart if they are of the specified type. |
|
static EditPart |
getEditPart(org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart dep,
EObject theElement)
Deprecated. use IGraphicalFrameworkBridge#getEditPart(IEditorPart, Object) instead |
|
static EditPart |
getEditPart(EObject eObject)
Deprecated. use IGraphicalFrameworkBridge#getEditPart(Object) instead |
|
static EditPart |
getEditPart(EObject eObject,
EditPart rootEditPart)
Deprecated. use IGraphicalFrameworkBridge#getEditPart(IEditorPart, Object) instead |
|
static EditPart |
getEditPart(IEditorPart editorPart,
EObject element)
Deprecated. use IGraphicalFrameworkBridge#getEditPart(IEditorPart, Object) instead |
|
static List<EditPart> |
getEditParts(org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart dep,
EObject theElement)
Finds ALL edit parts connected to the given semantic element. |
|
static EditPart |
getLabel(IWorkbenchPart editorPart,
EObject node)
Returns the label edit part of the given node. |
|
static List<EObject> |
getModelElementsFromSelection()
Returns a list of the EObjects currently selected in the diagram. |
|
static EObject |
getModelFromGmfEditor(org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor diagramEditor)
Get the model from a given GMF editor. |
|
static
|
iterator2Collection(Iterator<T> iter)
Convert an Iterator to a Collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static EObject getModelFromGmfEditor(org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor diagramEditor)
diagramEditor
- the diagram editor
public static EditPart getEditPart(EObject eObject, EditPart rootEditPart)
IGraphicalFrameworkBridge#getEditPart(IEditorPart, Object)
instead
eObject
- the semantic objectrootEditPart
- the root EditPart so start the search. May be null, then the current active editor
is used
public static List<EditPart> getEditParts(org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart dep, EObject theElement)
dep
- the root edit parttheElement
- the element to look for
public static EditPart getEditPart(org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart dep, EObject theElement)
IGraphicalFrameworkBridge#getEditPart(IEditorPart, Object)
instead
dep
- the DiagramEditPart to search intheElement
- the EObject to find
null
if none was foundpublic static EditPart getEditPart(IEditorPart editorPart, EObject element)
IGraphicalFrameworkBridge#getEditPart(IEditorPart, Object)
instead
editorPart
- an editor partelement
- the EObject to find
null
if none was foundpublic static Collection<EObject> getAllByType(EClassifier eObjectClass, EditPart rootEditPart)
eObjectClass
- The type of objectrootEditPart
- The root object
public static <T> Collection<T> iterator2Collection(Iterator<T> iter)
T
- the base typeiter
- The input Iterator
public static List<EObject> getModelElementsFromSelection()
public static EditPart getEditPart(EObject eObject)
IGraphicalFrameworkBridge#getEditPart(Object)
instead
eObject
- the semantic object
public static EditPart getLabel(IWorkbenchPart editorPart, EObject node)
editorPart
- a workbench partnode
- a node object
null
if none is found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |