public class VilModelQuery extends java.lang.Object implements IModelQuery<Script,IBuildlangElement,ILanguageElement>, ModelUtils.IModelFinder<Script,IBuildlangElement>
| Modifier and Type | Field and Description |
|---|---|
static VilModelQuery |
INSTANCE |
| Constructor and Description |
|---|
VilModelQuery() |
| Modifier and Type | Method and Description |
|---|---|
ILanguageElement |
findDeclaration(Script project,
IBuildlangElement modelElement)
Finds a model element an returns a generic result.
|
IBuildlangElement |
findElement(Script model,
java.lang.String name)
Tries to find an element declaration for
name. |
static IBuildlangElement |
findScriptElement(Script model,
java.lang.String name)
Tries to find an element declaration for
name. |
IBuildlangElement |
getModelElement(java.lang.String selectedElement,
java.lang.String selectedElementsProjectName)
Returns the element of the model identified by the selected
element (the name) and the scope which is the name of the project the
selected element is located in.
|
ModelManagement<Script> |
getModelManagement()
Returns the model management instance.
|
Script |
getParentProject(IBuildlangElement modelElement)
Returns the parent model/project the model element is declared in.
|
public static final VilModelQuery INSTANCE
public ModelManagement<Script> getModelManagement()
IModelQuerygetModelManagement in interface IModelQuery<Script,IBuildlangElement,ILanguageElement>public IBuildlangElement getModelElement(java.lang.String selectedElement, java.lang.String selectedElementsProjectName)
IModelQuerygetModelElement in interface IModelQuery<Script,IBuildlangElement,ILanguageElement>selectedElement - the name of the selected element as a String for which
the element in the model should be found.selectedElementsProjectName - the name of the project of the selected element as a
String which is used as the starting point for finding
the corresponding element in the modelnull if the element could not be
found.public Script getParentProject(IBuildlangElement modelElement)
IModelQuerygetParentProject in interface IModelQuery<Script,IBuildlangElement,ILanguageElement>modelElement - the model element for which the parent
project should be foundnull if the given model element is null,
if the model element has no top-level parent (which typically
is the project, or the top-level parent is not an instance of
project.public ILanguageElement findDeclaration(Script project, IBuildlangElement modelElement)
IModelQueryfindDeclaration in interface IModelQuery<Script,IBuildlangElement,ILanguageElement>project - the project to search withinmodelElement - the model elementpublic IBuildlangElement findElement(Script model, java.lang.String name)
ModelUtils.IModelFindername.findElement in interface ModelUtils.IModelFinder<Script,IBuildlangElement>model - the modelname - the name to search forpublic static IBuildlangElement findScriptElement(Script model, java.lang.String name)
name.model - the modelname - the name to search forCopyright © 2009 - 2018 SSE. All Rights Reserved.