Package de.uni_hildesheim.sse.ui.outline
Class VilBuildLanguageOutlineTreeProvider
- java.lang.Object
-
- org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider
-
- de.uni_hildesheim.sse.ui.outline.VilBuildLanguageOutlineTreeProvider
-
- All Implemented Interfaces:
org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider,org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider,org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider.Cancelable
public class VilBuildLanguageOutlineTreeProvider extends org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvidercustomization of the default outline structure.- Author:
- Dernek
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider
org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider.Background, org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider.Cancelable, org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider.ModeAware
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.xtext.ui.IImageHelperimageHelper
-
Constructor Summary
Constructors Constructor Description VilBuildLanguageOutlineTreeProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_createChildren(org.eclipse.xtext.ui.editor.outline.impl.DocumentRootNode parentNode, de.uni_hildesheim.sse.vilBuildLanguage.ImplementationUnit unit)Creates the children for the ImplementationUnit.boolean_isLeaf(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script)Returns the value if the script is a leaf or not.protected booleancheckAdviceName(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Advice advice)Checks whether a given advice is not null and has a name.private booleancheckCompoundNode(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Compound typedef)Checks whether a given typedef declaration is not null, has a name and a type (name).protected booleancheckParameter(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Parameter param)Checks whether a given parameter is not null, has a name and a type (name).protected booleancheckRuleDeclaration(de.uni_hildesheim.sse.vilBuildLanguage.RuleDeclaration ruleDecl)Checks whether a given rule declaration is not null and has a name.protected booleancheckScriptParent(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script)Checks whether a given script is not null and has a name.private booleancheckTypedefNode(de.uni_hildesheim.sse.vil.expressions.expressionDsl.TypeDef typedef)Checks whether a given typedef declaration is not null, has a name and a type (name).protected booleancheckVariableDeclaration(de.uni_hildesheim.sse.vil.expressions.expressionDsl.VariableDeclaration varDecl)Checks whether a given variable declaration is not null, has a name and a type (name).protected voidcreateAdviceNodes(org.eclipse.emf.common.util.EList<de.uni_hildesheim.sse.vil.expressions.expressionDsl.Advice> adviceList, VirtualOutlineNode parentNode)creates a node for every Advice-Statement.private voidcreateCompoundNode(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Compound compound, VirtualOutlineNode parentNode)Creates the Compounds.protected voidcreateImportNodes(org.eclipse.emf.common.util.EList<de.uni_hildesheim.sse.vil.expressions.expressionDsl.Import> importList, VirtualOutlineNode parentNode)Creates the nodes for the imports.protected voidcreateParametersNodes(org.eclipse.emf.common.util.EList<de.uni_hildesheim.sse.vil.expressions.expressionDsl.Parameter> paramList, VirtualOutlineNode parentNode)Creates the Nodes for the parameters.protected voidcreatePropertyNodes(org.eclipse.emf.common.util.EList<de.uni_hildesheim.sse.vilBuildLanguage.LoadProperties> propList, VirtualOutlineNode parentNode)Creates the nodes for the properties.protected voidcreateScriptContentNode(org.eclipse.emf.ecore.EObject element, VirtualOutlineNode parentNode)Creates (further) content nodes.protected voidcreateScriptContentNodes(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script, VirtualOutlineNode parentNode)Creates the content nodes forscript.protected voidcreateScriptContentNodes(org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> content, VirtualOutlineNode parentNode)Creates the RuleDeclarations and the VariableDeclarations.protected voidcreateScriptNodes(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script, org.eclipse.xtext.ui.editor.outline.impl.DocumentRootNode parentNode)creates a node for the vilScript.private voidcreateTypdefNode(de.uni_hildesheim.sse.vil.expressions.expressionDsl.TypeDef typedef, VirtualOutlineNode parentNode)Creates the type defs.private voidcreateVariableDeclarationNode(de.uni_hildesheim.sse.vil.expressions.expressionDsl.VariableDeclaration var, VirtualOutlineNode parentNode)Creates the VariableDeclarations.protected voidcreateVersionNode(de.uni_hildesheim.sse.vil.expressions.expressionDsl.VersionStmt version, org.eclipse.xtext.ui.editor.outline.IOutlineNode parentNode)Creates the version node.protected org.eclipse.xtext.ui.IImageHelpergetImageHelper()Returns the image helper.protected booleanhasContents(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script)Returns whetherscripthas contents.protected static booleanisEmpty(org.eclipse.emf.common.util.EList<?> list)Check whether a given EList is null or empty.protected java.lang.StringtoString(de.uni_hildesheim.sse.vil.expressions.expressionDsl.ParameterList params)protected java.lang.StringtoString(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Type type)-
Methods inherited from class org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider
_createChildren, _createChildren, _createChildren, _createChildren, _createNode, _createNode, _createNode, _image, _isLeaf, _isLeaf, _text, checkCanceled, createChildren, createEObjectNode, createEObjectNode, createEStructuralFeatureNode, createEStructuralFeatureNode, createNode, createRoot, createRoot, isLocalElement, nullSafeClassName, setTextRegion
-
-
-
-
Method Detail
-
_createChildren
protected void _createChildren(org.eclipse.xtext.ui.editor.outline.impl.DocumentRootNode parentNode, de.uni_hildesheim.sse.vilBuildLanguage.ImplementationUnit unit)Creates the children for the ImplementationUnit.- Parameters:
parentNode- parentNodeunit- Create children for unit-object
-
createAdviceNodes
protected void createAdviceNodes(org.eclipse.emf.common.util.EList<de.uni_hildesheim.sse.vil.expressions.expressionDsl.Advice> adviceList, VirtualOutlineNode parentNode)creates a node for every Advice-Statement.- Parameters:
adviceList- List with all AdvicesparentNode- parentnode
-
createScriptNodes
protected void createScriptNodes(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script, org.eclipse.xtext.ui.editor.outline.impl.DocumentRootNode parentNode)creates a node for the vilScript.- Parameters:
script- the vilScriptparentNode- parentnode
-
hasContents
protected boolean hasContents(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script)
Returns whetherscripthas contents.- Parameters:
script- the script- Returns:
trueif the script has contents,falseelse
-
createScriptContentNodes
protected void createScriptContentNodes(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script, VirtualOutlineNode parentNode)Creates the content nodes forscript.- Parameters:
script- the script to create the content nodes forparentNode- the parent node for adding new nodes
-
createVersionNode
protected void createVersionNode(de.uni_hildesheim.sse.vil.expressions.expressionDsl.VersionStmt version, org.eclipse.xtext.ui.editor.outline.IOutlineNode parentNode)Creates the version node.- Parameters:
version- versionparentNode- version will be displayed under this node
-
createParametersNodes
protected void createParametersNodes(org.eclipse.emf.common.util.EList<de.uni_hildesheim.sse.vil.expressions.expressionDsl.Parameter> paramList, VirtualOutlineNode parentNode)Creates the Nodes for the parameters.- Parameters:
paramList- List with the parametersparentNode- all parameters will be displayed under this node
-
createPropertyNodes
protected void createPropertyNodes(org.eclipse.emf.common.util.EList<de.uni_hildesheim.sse.vilBuildLanguage.LoadProperties> propList, VirtualOutlineNode parentNode)Creates the nodes for the properties.- Parameters:
propList- List with all propertiesparentNode- all properties will be displayed under this node
-
createImportNodes
protected void createImportNodes(org.eclipse.emf.common.util.EList<de.uni_hildesheim.sse.vil.expressions.expressionDsl.Import> importList, VirtualOutlineNode parentNode)Creates the nodes for the imports.- Parameters:
importList- List with all importsparentNode- all imports will be displayed under this node
-
createScriptContentNodes
protected void createScriptContentNodes(org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> content, VirtualOutlineNode parentNode)Creates the RuleDeclarations and the VariableDeclarations.- Parameters:
content- ScriptContentsparentNode- all Rules and Variables will be displayed under this node
-
createVariableDeclarationNode
private void createVariableDeclarationNode(de.uni_hildesheim.sse.vil.expressions.expressionDsl.VariableDeclaration var, VirtualOutlineNode parentNode)Creates the VariableDeclarations.- Parameters:
var- variableparentNode- all Rules and Variables will be displayed under this node
-
createTypdefNode
private void createTypdefNode(de.uni_hildesheim.sse.vil.expressions.expressionDsl.TypeDef typedef, VirtualOutlineNode parentNode)Creates the type defs.- Parameters:
typedef- typedefparentNode- all Rules and Variables will be displayed under this node
-
createCompoundNode
private void createCompoundNode(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Compound compound, VirtualOutlineNode parentNode)Creates the Compounds.- Parameters:
compound- compoundparentNode- all Rules and Variables will be displayed under this node
-
toString
protected java.lang.String toString(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Type type)
-
toString
protected java.lang.String toString(de.uni_hildesheim.sse.vil.expressions.expressionDsl.ParameterList params)
-
createScriptContentNode
protected void createScriptContentNode(org.eclipse.emf.ecore.EObject element, VirtualOutlineNode parentNode)Creates (further) content nodes.- Parameters:
content- ScriptContentsparentNode- all Rules and Variables will be displayed under this node
-
_isLeaf
public boolean _isLeaf(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script)
Returns the value if the script is a leaf or not.- Parameters:
script-- Returns:
- true, if the script is leaf.
-
isEmpty
protected static boolean isEmpty(org.eclipse.emf.common.util.EList<?> list)
Check whether a given EList is null or empty.- Parameters:
list- The list to be checked.- Returns:
- True if the list is null or has no elements. False otherwise.
-
checkScriptParent
protected boolean checkScriptParent(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script)
Checks whether a given script is not null and has a name.- Parameters:
script- the script to be checked- Returns:
- True if the script is not null and has a name. False otherwise.
-
checkAdviceName
protected boolean checkAdviceName(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Advice advice)
Checks whether a given advice is not null and has a name.- Parameters:
advice- the advice to be checked- Returns:
- True if the advice is not null and has a name. False otherwise.
-
checkParameter
protected boolean checkParameter(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Parameter param)
Checks whether a given parameter is not null, has a name and a type (name).- Parameters:
param- the parameter to be checked.- Returns:
- True if the parameter is completely defined. False otherwise.
-
checkRuleDeclaration
protected boolean checkRuleDeclaration(de.uni_hildesheim.sse.vilBuildLanguage.RuleDeclaration ruleDecl)
Checks whether a given rule declaration is not null and has a name.- Parameters:
ruleDecl- the rule declaration to be checked.- Returns:
- True if the rule declaration is not null and has a name. False otherwise.
-
checkVariableDeclaration
protected boolean checkVariableDeclaration(de.uni_hildesheim.sse.vil.expressions.expressionDsl.VariableDeclaration varDecl)
Checks whether a given variable declaration is not null, has a name and a type (name).- Parameters:
varDecl- the variable declaration to be checked- Returns:
- True if the variable declaration is completely defined. False otherwise.
-
checkTypedefNode
private boolean checkTypedefNode(de.uni_hildesheim.sse.vil.expressions.expressionDsl.TypeDef typedef)
Checks whether a given typedef declaration is not null, has a name and a type (name).- Parameters:
typedef- the typedef to be checked- Returns:
- True if the variable declaration is completely defined. False otherwise.
-
checkCompoundNode
private boolean checkCompoundNode(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Compound typedef)
Checks whether a given typedef declaration is not null, has a name and a type (name).- Parameters:
typedef- the typedef to be checked- Returns:
- True if the variable declaration is completely defined. False otherwise.
-
getImageHelper
protected org.eclipse.xtext.ui.IImageHelper getImageHelper()
Returns the image helper.- Returns:
- the image helper
-
-