Class 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.DefaultOutlineTreeProvider
    customization 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.IImageHelper imageHelper  
      • Fields inherited from class org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider

        createChildrenDispatcher, createNodeDispatcher, imageDispatcher, isLeafDispatcher, labelProvider, locationInFileProvider, textDispatcher
    • 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 boolean checkAdviceName​(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Advice advice)
      Checks whether a given advice is not null and has a name.
      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).
      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).
      protected boolean checkRuleDeclaration​(de.uni_hildesheim.sse.vilBuildLanguage.RuleDeclaration ruleDecl)
      Checks whether a given rule declaration is not null and has a name.
      protected boolean checkScriptParent​(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script)
      Checks whether a given script is not null and has a name.
      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).
      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).
      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.
      private void createCompoundNode​(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Compound compound, VirtualOutlineNode parentNode)
      Creates the Compounds.
      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.
      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.
      protected void createPropertyNodes​(org.eclipse.emf.common.util.EList<de.uni_hildesheim.sse.vilBuildLanguage.LoadProperties> propList, VirtualOutlineNode parentNode)
      Creates the nodes for the properties.
      protected void createScriptContentNode​(org.eclipse.emf.ecore.EObject element, VirtualOutlineNode parentNode)
      Creates (further) content nodes.
      protected void createScriptContentNodes​(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script, VirtualOutlineNode parentNode)
      Creates the content nodes for script.
      protected void createScriptContentNodes​(org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> content, VirtualOutlineNode parentNode)
      Creates the RuleDeclarations and the VariableDeclarations.
      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.
      private void createTypdefNode​(de.uni_hildesheim.sse.vil.expressions.expressionDsl.TypeDef typedef, VirtualOutlineNode parentNode)
      Creates the type defs.
      private void createVariableDeclarationNode​(de.uni_hildesheim.sse.vil.expressions.expressionDsl.VariableDeclaration var, VirtualOutlineNode parentNode)
      Creates the VariableDeclarations.
      protected void createVersionNode​(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.IImageHelper getImageHelper()
      Returns the image helper.
      protected boolean hasContents​(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script)
      Returns whether script has contents.
      protected static boolean isEmpty​(org.eclipse.emf.common.util.EList<?> list)
      Check whether a given EList is null or empty.
      protected java.lang.String toString​(de.uni_hildesheim.sse.vil.expressions.expressionDsl.ParameterList params)  
      protected java.lang.String toString​(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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • imageHelper

        @Inject
        private org.eclipse.xtext.ui.IImageHelper imageHelper
    • Constructor Detail

      • VilBuildLanguageOutlineTreeProvider

        public VilBuildLanguageOutlineTreeProvider()
    • 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 - parentNode
        unit - 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 Advices
        parentNode - 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 vilScript
        parentNode - parentnode
      • hasContents

        protected boolean hasContents​(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script)
        Returns whether script has contents.
        Parameters:
        script - the script
        Returns:
        true if the script has contents, false else
      • createScriptContentNodes

        protected void createScriptContentNodes​(de.uni_hildesheim.sse.vilBuildLanguage.LanguageUnit script,
                                                VirtualOutlineNode parentNode)
        Creates the content nodes for script.
        Parameters:
        script - the script to create the content nodes for
        parentNode - 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 - version
        parentNode - 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 parameters
        parentNode - 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 properties
        parentNode - 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 imports
        parentNode - 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 - ScriptContents
        parentNode - 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 - variable
        parentNode - 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 - typedef
        parentNode - 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 - compound
        parentNode - 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 - ScriptContents
        parentNode - 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