Package de.gebit.integrity.ui.outline

## Class DSLOutlineTreeProvider

- java.lang.Object
- - org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider
  - - de.gebit.integrity.ui.outline.DSLOutlineTreeProvider

- 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 DSLOutlineTreeProvider
      extends org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider

  Customization of the default outline structure.
  Author:
    Rene Schneider - initial API and implementation, tilois - actual first working implementation of a usable outline beyond the Xtext-generated default

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `protected static class` | `DSLOutlineTreeProvider.SuiteType` | Differentiates between the different occurences of suites.

    - ### 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 inherited from class org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider

      `createChildrenDispatcher, createNodeDispatcher, imageDispatcher, isLeafDispatcher, labelProvider, locationInFileProvider, textDispatcher`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DSLOutlineTreeProvider()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `_createChildren​(org.eclipse.xtext.ui.editor.outline.impl.DocumentRootNode aParentNode, Model aModelElement)` | Dynamic Dispatch of `DefaultOutlineTreeProvider.createChildren(IOutlineNode, EObject)`.
    `void` | `_createChildren​(org.eclipse.xtext.ui.editor.outline.IOutlineNode aParent, SuiteDefinition aSuiteDefinition)` | Dynamic Dispatch of `DefaultOutlineTreeProvider.createChildren(IOutlineNode, EObject)`.
    `protected void` | `_createNode​(IntegrityDocumentRoot parentNode, Import anImport)` | Dynamic Dispatch of `DefaultOutlineTreeProvider.createNode(IOutlineNode, EObject)`.
    `protected void` | `_createNode​(org.eclipse.xtext.ui.editor.outline.IOutlineNode aParentNode, SuiteDefinition aSuiteDefinition)` | Dynamic Dispatch of `DefaultOutlineTreeProvider.createNode(IOutlineNode, EObject)`.
    `protected void` | `_createNode​(org.eclipse.xtext.ui.editor.outline.IOutlineNode aParentNode, SuiteStatementWithResult aModelElement)` | Dynamic Dispatch of `DefaultOutlineTreeProvider.createNode(IOutlineNode, EObject)`.
    `protected org.eclipse.swt.graphics.Image` | `_image​(ConstantDefinition aSuite)` | Dynamic Dispatch of `DefaultOutlineTreeProvider._image(Object)`.
    `protected org.eclipse.swt.graphics.Image` | `_image​(Import anImport)` | Dynamic Dispatch of `DefaultOutlineTreeProvider._image(Object)`.
    `protected org.eclipse.swt.graphics.Image` | `_image​(PackageDefinition anPackage)` | Dynamic Dispatch of `DefaultOutlineTreeProvider._image(Object)`.
    `protected org.eclipse.swt.graphics.Image` | `_image​(SuiteDefinition aSuite)` | Dynamic Dispatch of `DefaultOutlineTreeProvider._image(Object)`.
    `protected org.eclipse.swt.graphics.Image` | `_image​(VariableDefinition aVariable)` | Dynamic Dispatch of `DefaultOutlineTreeProvider._image(Object)`.
    `protected Object` | `_image​(VariableEntity aParameter)` | Dynamic Dispatch of `DefaultOutlineTreeProvider._image(Object)`.
    `protected boolean` | `_isLeaf​(ConstantDefinition aConstantDefinition)` | Dynamic Dispatch of `DefaultOutlineTreeProvider._isLeaf(Object)`.
    `protected boolean` | `_isLeaf​(VariableDefinition aVariableDefintion)` | Dynamic Dispatch of `DefaultOutlineTreeProvider._isLeaf(Object)`.
    `protected Object` | `_text​(ConstantDefinition aConstantDefinition)` | Dynamic Dispatch of `DefaultOutlineTreeProvider._text(Object)`.
    `protected Object` | `_text​(Import anImport)` | Dynamic Dispatch of `DefaultOutlineTreeProvider._text(Object)`.
    `protected org.eclipse.jface.viewers.StyledString` | `_text​(SuiteDefinition aSuiteDefinition)` | Dynamic Dispatch of `DefaultOutlineTreeProvider._text(Object)`.
    `protected Object` | `_text​(VariableDefinition aVariableDefinition)` | Dynamic Dispatch of `DefaultOutlineTreeProvider._text(Object)`.
    `protected Object` | `_text​(VariableEntity aParameter)` | Dynamic Dispatch of `DefaultOutlineTreeProvider._text(Object)`.
    `protected org.eclipse.jface.viewers.StyledString` | `appendExplanationTo​(org.eclipse.jface.viewers.StyledString aNormalText, String anExplanation)` | Appends an explanation text to the given styled text.
    `org.eclipse.xtext.ui.editor.outline.IOutlineNode` | `createOutlineContainer​(org.eclipse.xtext.ui.editor.outline.impl.DocumentRootNode aRoot)` | Creates a container object for imports.
    `IntegrityDocumentRoot` | `createRoot​(org.eclipse.xtext.ui.editor.model.IXtextDocument document)` |
    `protected org.eclipse.xtext.ui.editor.outline.impl.EObjectNode` | `createSuiteNode​(org.eclipse.xtext.ui.editor.outline.IOutlineNode aParentNode, SuiteDefinition aSuiteDefinition, DSLOutlineTreeProvider.SuiteType aType)` | Creates a Suite Node, which is a special case because there are multiple types of suite nodes and we need to know this type before, as the node itself is unaware of it's type.
    `protected String` | `getValueOf​(ValueOrEnumValueOrOperationCollection aValue)` | Gets the textual representation of an arbitrary value from the source.
    `protected org.eclipse.swt.graphics.Image` | `image​(String aName)` | Assumes that all images are loaded from the subfolder "outline" and prepends it to the given name if not already present.
    `protected org.eclipse.swt.graphics.Image` | `suiteImage​(DSLOutlineTreeProvider.SuiteType aType)` | Gets an image for the given suite definition.
    `protected org.eclipse.jface.viewers.StyledString` | `text​(SuiteDefinition aSuiteDefinition, DSLOutlineTreeProvider.SuiteType aType)` | Returns a styled textual representation of the given suite definition.

    - ### 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, isLocalElement, nullSafeClassName, setTextRegion`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DSLOutlineTreeProvider

          public DSLOutlineTreeProvider()

  - ### Method Detail

    - #### _createChildren

          public void _createChildren​(org.eclipse.xtext.ui.editor.outline.IOutlineNode aParent,
                                      SuiteDefinition aSuiteDefinition)

      Dynamic Dispatch of `DefaultOutlineTreeProvider.createChildren(IOutlineNode, EObject)`.

    - #### _createNode

          protected void _createNode​(org.eclipse.xtext.ui.editor.outline.IOutlineNode aParentNode,
                                     SuiteStatementWithResult aModelElement)

      Dynamic Dispatch of `DefaultOutlineTreeProvider.createNode(IOutlineNode, EObject)`.

    - #### _createNode

          protected void _createNode​(org.eclipse.xtext.ui.editor.outline.IOutlineNode aParentNode,
                                     SuiteDefinition aSuiteDefinition)

      Dynamic Dispatch of `DefaultOutlineTreeProvider.createNode(IOutlineNode, EObject)`.

    - #### _createChildren

          protected void _createChildren​(org.eclipse.xtext.ui.editor.outline.impl.DocumentRootNode aParentNode,
                                         Model aModelElement)

      Dynamic Dispatch of `DefaultOutlineTreeProvider.createChildren(IOutlineNode, EObject)`.

    - #### _createNode

          protected void _createNode​(IntegrityDocumentRoot parentNode,
                                     Import anImport)

      Dynamic Dispatch of `DefaultOutlineTreeProvider.createNode(IOutlineNode, EObject)`.

    - #### createRoot

          public IntegrityDocumentRoot createRoot​(org.eclipse.xtext.ui.editor.model.IXtextDocument document)

      Specified by:
        `createRoot` in interface `org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider`
      Overrides:
        `createRoot` in class `org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider`

    - #### createOutlineContainer

          public org.eclipse.xtext.ui.editor.outline.IOutlineNode createOutlineContainer​(org.eclipse.xtext.ui.editor.outline.impl.DocumentRootNode aRoot)

      Creates a container object for imports.
      Parameters:
        `aRoot` - Root for which to create this container.
      Returns:
        Container objects.

    - #### createSuiteNode

          protected org.eclipse.xtext.ui.editor.outline.impl.EObjectNode createSuiteNode​(org.eclipse.xtext.ui.editor.outline.IOutlineNode aParentNode,
                                                                                         SuiteDefinition aSuiteDefinition,
                                                                                         DSLOutlineTreeProvider.SuiteType aType)

      Creates a Suite Node, which is a special case because there are multiple types of suite nodes and we need to know this type before, as the node itself is unaware of it's type.
      Parameters:
        `aParentNode` - Parent of this node
        `aSuiteDefinition` - Suitedefinition this node is linked to
        `aType` - Type of the suite
      Returns:
        An `EObjectNode` representing this suite declaration, but is unaware of it's suite type.

    - #### _text

          protected Object _text​(Import anImport)

      Dynamic Dispatch of `DefaultOutlineTreeProvider._text(Object)`.

    - #### _text

          protected Object _text​(VariableDefinition aVariableDefinition)

      Dynamic Dispatch of `DefaultOutlineTreeProvider._text(Object)`.

    - #### _text

          protected Object _text​(ConstantDefinition aConstantDefinition)

      Dynamic Dispatch of `DefaultOutlineTreeProvider._text(Object)`.

    - #### getValueOf

          protected String getValueOf​(ValueOrEnumValueOrOperationCollection aValue)

      Gets the textual representation of an arbitrary value from the source. Unless it's an `NestedObject`, where a placeholder is returned, as NestedObjects are expected to hold a multiline value, which can't be displayed in the outline properly.
      Parameters:
        `aValue` - Value to display
      Returns:
        Textual representation of this value.

    - #### _text

          protected Object _text​(VariableEntity aParameter)

      Dynamic Dispatch of `DefaultOutlineTreeProvider._text(Object)`.

    - #### _text

          protected org.eclipse.jface.viewers.StyledString _text​(SuiteDefinition aSuiteDefinition)

      Dynamic Dispatch of `DefaultOutlineTreeProvider._text(Object)`.

    - #### text

          protected org.eclipse.jface.viewers.StyledString text​(SuiteDefinition aSuiteDefinition,
                                                                DSLOutlineTreeProvider.SuiteType aType)

      Returns a styled textual representation of the given suite definition.
      Parameters:
        `aSuiteDefinition` - Suite definition to get a textual representation.
        `aType` - Type of the suite definition
      Returns:
        Textual representation of this suite definition.

    - #### _image

          protected org.eclipse.swt.graphics.Image _image​(Import anImport)

      Dynamic Dispatch of `DefaultOutlineTreeProvider._image(Object)`.

    - #### _image

          protected org.eclipse.swt.graphics.Image _image​(SuiteDefinition aSuite)

      Dynamic Dispatch of `DefaultOutlineTreeProvider._image(Object)`.

    - #### _image

          protected org.eclipse.swt.graphics.Image _image​(VariableDefinition aVariable)

      Dynamic Dispatch of `DefaultOutlineTreeProvider._image(Object)`.

    - #### _image

          protected org.eclipse.swt.graphics.Image _image​(ConstantDefinition aSuite)

      Dynamic Dispatch of `DefaultOutlineTreeProvider._image(Object)`.

    - #### _image

          protected org.eclipse.swt.graphics.Image _image​(PackageDefinition anPackage)

      Dynamic Dispatch of `DefaultOutlineTreeProvider._image(Object)`.

    - #### _image

          protected Object _image​(VariableEntity aParameter)

      Dynamic Dispatch of `DefaultOutlineTreeProvider._image(Object)`.

    - #### suiteImage

          protected org.eclipse.swt.graphics.Image suiteImage​(DSLOutlineTreeProvider.SuiteType aType)

      Gets an image for the given suite definition.
      Parameters:
        `aType` - Type of the suite definition
      Returns:
        Image represention this suite declaration.

    - #### image

          protected org.eclipse.swt.graphics.Image image​(String aName)

      Assumes that all images are loaded from the subfolder "outline" and prepends it to the given name if not already present. Also assumes that all images are in PNG format and will add that suffix, if not already present.
      Parameters:
        `aName` - Name of the image.
      Returns:
        Image.

    - #### _isLeaf

          protected boolean _isLeaf​(VariableDefinition aVariableDefintion)

      Dynamic Dispatch of `DefaultOutlineTreeProvider._isLeaf(Object)`.

    - #### _isLeaf

          protected boolean _isLeaf​(ConstantDefinition aConstantDefinition)

      Dynamic Dispatch of `DefaultOutlineTreeProvider._isLeaf(Object)`.

    - #### appendExplanationTo

          protected org.eclipse.jface.viewers.StyledString appendExplanationTo​(org.eclipse.jface.viewers.StyledString aNormalText,
                                                                               String anExplanation)

      Appends an explanation text to the given styled text.
      Parameters:
        `aNormalText` - Normal text where the explanation should be appended to.
        `anExplanation` - Explanation text.
      Returns:
        Styled text with an explanation text.