|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.core.ui.errorhandler.ModelingUtil
public final class ModelingUtil
Utility class with static methods to handle EMF models and GEF EditParts. FIXME: This is a direct copy of de.cau.cs.kieler.core.model.util.ModelingUtil in order to avoid the dependency of kieler.core.ui to kieler.core.model (which would always pull in all the modeling stuff like Xtend/Xpand). This should be handled in some other way, e.g. the ErrorHandler should be extensible by other plugins or something like that.
Method Summary | ||
---|---|---|
static Collection<EObject> |
getAllAncestorsByType(EClassifier eObjectClass,
EObject rootObject)
Get all objects that are direct or indirect parents of the given root EObject if they are of the given type. |
|
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 Collection<EObject> |
getAllByType(EClassifier eObjectClass,
EObject rootObject)
Get all objects that are direct or indirect children of the given root EObject if they are of the specified type. |
|
static EditPart |
getEditPart(EObject eObject)
Find an GEF EditPart that corresponds to an semantic model EObject. |
|
static EditPart |
getEditPart(EObject eObject,
EditPart rootEditPart)
Find an GEF EditPart that corresponds to an semantic model EObject. |
|
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 List<EObject> |
getModelElementsFromSelection()
Returns a list of the EObjects currently selected in the diagram. |
|
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 EditPart getEditPart(EObject eObject, EditPart rootEditPart)
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 Collection<EObject> getAllByType(EClassifier eObjectClass, EObject rootObject)
eObjectClass
- The type of objectrootObject
- The root object
public static Collection<EObject> getAllAncestorsByType(EClassifier eObjectClass, EObject rootObject)
eObjectClass
- The type of objectrootObject
- The root object to start the search
public 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)
eObject
- the semantic object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |