Class VilEcoreModelQuery
- java.lang.Object
-
- net.ssehub.easy.dslCore.ui.hyperlinking.AbstractEcoreModelQuery<P,R>
-
- de.uni_hildesheim.sse.vil.expressions.ui.hyperlinking.AbstractEcoreModelQuery<de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit,ILanguageElement>
-
- de.uni_hildesheim.sse.ui.hyperlinking.VilEcoreModelQuery
-
- All Implemented Interfaces:
IEcoreModelQuery<de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit,ILanguageElement>
public class VilEcoreModelQuery extends AbstractEcoreModelQuery<de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit,ILanguageElement>
VIL Ecore model queries.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private VilEcoreModelFinderfinder
-
Constructor Summary
Constructors Constructor Description VilEcoreModelQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.emf.ecore.EObjectgetEcoreElement(CommonXtextEditor<?,de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit> editor, ILanguageElement declaration)Returns theEObjectof the parse tree of the given editor's resource that matches the element described by the givenModelElementDescription.protected de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnitgetLanguageUnit(org.eclipse.xtext.resource.XtextResource resource)Returns theLanguageUnitin the given resource (VTL-file).java.lang.StringgetName(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit project)Returns the name of the project.de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnitgetProject(org.eclipse.xtext.nodemodel.ICompositeNode rootNode)Returns the "project" of the Ecore-model represented by the given root node.-
Methods inherited from class de.uni_hildesheim.sse.vil.expressions.ui.hyperlinking.AbstractEcoreModelQuery
findCompound, findTypedef, findVariableDeclaration
-
Methods inherited from class net.ssehub.easy.dslCore.ui.hyperlinking.AbstractEcoreModelQuery
getRootNode, getXtextResource, notEmpty, notEmpty, notEmpty
-
-
-
-
Field Detail
-
finder
private VilEcoreModelFinder finder
-
-
Method Detail
-
getName
public java.lang.String getName(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit project)
Description copied from interface:IEcoreModelQueryReturns the name of the project.- Parameters:
project- the project- Returns:
- the name of
project
-
getProject
public de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit getProject(org.eclipse.xtext.nodemodel.ICompositeNode rootNode)
Description copied from interface:IEcoreModelQueryReturns the "project" of the Ecore-model represented by the given root node.- Parameters:
rootNode- theICompositeNodewhich is the root of the Ecore-model from which the "project" should be retrieved- Returns:
- the "project" in the given resource. May return
nullif the given root node isnull, or there is no "project" in that file
-
getEcoreElement
public org.eclipse.emf.ecore.EObject getEcoreElement(CommonXtextEditor<?,de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit> editor, ILanguageElement declaration)
Description copied from interface:IEcoreModelQueryReturns theEObjectof the parse tree of the given editor's resource that matches the element described by the givenModelElementDescription. The search for this object will be performed in the Ecore-model of the given editor's resource only. This requires that it is ensured that the given editor displays a file which includes the desired element.- Parameters:
editor- theXtextEditorwhich displays the file in which the desired element should be founddeclaration- theModelElementDescriptionthat describes the model element that should be found in the parse tree of the given editor's resource- Returns:
- the
EObjectthat matches the element described by the givenModelElementDescription. May returnnullif the element could not be found
-
getLanguageUnit
protected de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit getLanguageUnit(org.eclipse.xtext.resource.XtextResource resource)
Returns theLanguageUnitin the given resource (VTL-file).- Parameters:
resource- theXtextResourcefrom which theLanguageUnitshould be retrieved- Returns:
- the
LanguageUnitin the given resource. May returnnullif the given resource isnull, cannot be parsed, or there is noLanguageUnitin that file
-
-