Class VilEcoreModelFinder
- java.lang.Object
-
- de.uni_hildesheim.sse.ui.hyperlinking.VilEcoreModelFinder
-
public class VilEcoreModelFinder extends java.lang.ObjectA Ecore model element finder for VIL.- Author:
- Holger Eichelberger
-
-
Constructor Summary
Constructors Constructor Description VilEcoreModelFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcalcLevel(ILanguageElement elt, java.lang.Class<?> stopCls)Determines the nesting level ofelementuntilstopCls.protected org.eclipse.emf.ecore.EObjectfindInRuleElt(de.uni_hildesheim.sse.vilBuildLanguage.RuleElement elt, ILanguageElement declaration, int level)Tries findingdeclarationinelt.protected org.eclipse.emf.ecore.EObjectfindInRuleElts(de.uni_hildesheim.sse.vilBuildLanguage.RuleElementBlock block, ILanguageElement declaration, int level)Tries findingdeclarationin the defs ofblock.protected org.eclipse.emf.ecore.EObjectfindInRuleElts(java.util.List<? extends de.uni_hildesheim.sse.vilBuildLanguage.RuleElement> elts, ILanguageElement declaration, int level)Tries findingdeclarationin the defs ofelts.org.eclipse.emf.ecore.EObjectgetEcoreElement(org.eclipse.emf.ecore.EObject contentElement, ILanguageElement declaration)Returns the ECore object fordeclarationdefined incontentElement.
-
-
-
Method Detail
-
getEcoreElement
public org.eclipse.emf.ecore.EObject getEcoreElement(org.eclipse.emf.ecore.EObject contentElement, ILanguageElement declaration)Returns the ECore object fordeclarationdefined incontentElement.- Parameters:
contentElement- the content element to search withindeclaration- the declaration to search- Returns:
- the ECore object representing
declaration, may be null if not found
-
calcLevel
protected int calcLevel(ILanguageElement elt, java.lang.Class<?> stopCls)
Determines the nesting level ofelementuntilstopCls.- Parameters:
elt- the element to determine the nesting forstopCls- the stop class or run until the topmost parent- Returns:
- the nesting level
-
findInRuleElts
protected org.eclipse.emf.ecore.EObject findInRuleElts(de.uni_hildesheim.sse.vilBuildLanguage.RuleElementBlock block, ILanguageElement declaration, int level)Tries findingdeclarationin the defs ofblock.- Parameters:
block- the block to searchdeclaration- the declaration to search forlevel- the actual nesting level starting with the one ofelement, if greater 0 recurse to the next levels- Returns:
- the found EObject or null if not found
-
findInRuleElts
protected org.eclipse.emf.ecore.EObject findInRuleElts(java.util.List<? extends de.uni_hildesheim.sse.vilBuildLanguage.RuleElement> elts, ILanguageElement declaration, int level)Tries findingdeclarationin the defs ofelts.- Parameters:
elts- the elements to searchdeclaration- the declaration to search forlevel- the actual nesting level starting with the one ofelement, if greater 0 recurse to the next levels- Returns:
- the found EObject or null if not found
-
findInRuleElt
protected org.eclipse.emf.ecore.EObject findInRuleElt(de.uni_hildesheim.sse.vilBuildLanguage.RuleElement elt, ILanguageElement declaration, int level)Tries findingdeclarationinelt.- Parameters:
elt- the element to searchdeclaration- the declaration to search forlevel- the actual nesting level starting with the one ofelement, if greater 0 recurse to the next levels- Returns:
- the found EObject or null if not found
-
-