org.eclipse.viatra.query.tooling.ui.queryexplorer.content.matcher

## Class CompositeContent<ParentType,ChildType extends BaseContent<?>>

- java.lang.Object
- - org.eclipse.viatra.query.tooling.ui.queryexplorer.content.matcher.BaseContent<ParentType>
  - - org.eclipse.viatra.query.tooling.ui.queryexplorer.content.matcher.CompositeContent<ParentType,ChildType>

- Type Parameters:
    `ParentType` - the type of the parent content element
    `ChildType` - the type of the children content elements
  Direct Known Subclasses:
    PatternMatcherContent, PatternMatcherRootContent, RootContent

      public abstract class CompositeContent<ParentType,ChildType extends BaseContent<?>>
      extends BaseContent<ParentType>

  A content in the `QueryExplorer`'s tree viewer with children elements.

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.viatra.query.tooling.ui.queryexplorer.content.matcher.BaseContent

      `parent, text`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompositeContent(ParentType parent)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dispose()` Disposes of this content.
    `abstract org.eclipse.core.databinding.observable.list.IObservableList` | `getChildren()` Returns the `IObservableList` of child elements.
    `abstract java.util.Iterator<ChildType>` | `getChildrenIterator()` Returns an iterator on the child elements.
    `void` | `updateHasChildren()` Call this method if the element is already present in the tree viewer, but it is not expanded yet and the children list has changed.

    - ### Methods inherited from class org.eclipse.viatra.query.tooling.ui.queryexplorer.content.matcher.BaseContent

      `getParent, getText, setText`

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

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

- - ### Constructor Detail

    - #### CompositeContent

          public CompositeContent(ParentType parent)

  - ### Method Detail

    - #### dispose

          public void dispose()

      Description copied from class: `BaseContent`
      Disposes of this content. It is the method's responsibility to call dispose on all child elements. Important: do NOT call dispose on the children observable collection as it will be invoked when the observable tree viewer processes the list diffs. This implementation should only release those resources (matchers / engines / etc) which are directly bound to this content.
      Specified by:
        `dispose` in class `BaseContent<ParentType>`

    - #### updateHasChildren

          public void updateHasChildren()

      Call this method if the element is already present in the tree viewer, but it is not expanded yet and the children list has changed. In this case, even if the children are updated properly, the tree viewer will not show that the element has children. Calling this method only has effect if the element is not expanded yet (because in these cases the observable list propagates the updates properly).

    - #### getChildrenIterator

          public abstract java.util.Iterator<ChildType> getChildrenIterator()

      Returns an iterator on the child elements.
      Returns:
        the iterator on the child elements

    - #### getChildren

          public abstract org.eclipse.core.databinding.observable.list.IObservableList getChildren()

      Returns the `IObservableList` of child elements.
      Returns:
        the observable list of child elements