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

## Class QueryExplorer

- java.lang.Object
- - org.eclipse.core.commands.common.EventManager
  - - org.eclipse.ui.part.WorkbenchPart
    - - org.eclipse.ui.part.ViewPart
      - - org.eclipse.viatra.query.tooling.ui.queryexplorer.QueryExplorer

- All Implemented Interfaces:
    org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IPersistable, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation

      public class QueryExplorer
      extends org.eclipse.ui.part.ViewPart

  The Query Explorer can be used to observe the contents of the pattern matchers on given EMF models. The patterns and models can be loaded into the explorer and it provides a tree viewer to browse the contents. Additional functionality involves the possibility to filter match sets, navigate to source model elements, select which patterns are active, etc.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ID`
    `static PatternsViewerInput` | `patternsViewerInput`
    `static java.lang.String` | `QUERY_EXPLORER_ANNOTATION`
    `static java.lang.String` | `QUERY_EXPLORER_CHECKED_PARAMETER`

    - ### Fields inherited from interface org.eclipse.ui.IWorkbenchPart

      `PROP_TITLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `QueryExplorer()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearTableViewer()`
    `void` | `createPartControl(org.eclipse.swt.widgets.Composite parent)`
    `PatternsViewerFlatContentProvider` | `getFlatContentProvider()`
    `PatternsViewerFlatLabelProvider` | `getFlatLabelProvider()`
    `PatternsViewerHierarchicalContentProvider` | `getHierarchicalContentProvider()`
    `PatternsViewerHierarchicalLabelProvider` | `getHierarchicalLabelProvider()`
    `QueryEvaluationHint` | `getHints()`
    `static QueryExplorer` | `getInstance()`
    `static QueryExplorer` | `getInstance(org.eclipse.ui.IWorkbenchWindow activeWorkbenchWindow)`
    `org.eclipse.jface.viewers.TreeViewer` | `getMatcherTreeViewer()`
    `IModelConnector` | `getModelConnector(PatternMatcherRootContentKey key)`
    `java.util.Collection<PatternMatcherRootContentKey>` | `getPatternMatcherRootContentKeys()`
    `org.eclipse.jface.viewers.CheckboxTreeViewer` | `getPatternsViewer()`
    `org.eclipse.viatra.query.tooling.ui.queryexplorer.content.flyout.FlyoutControlComposite` | `getPatternsViewerFlyout()`
    `PatternsViewerInput` | `getPatternsViewerRoot()`
    `RootContent` | `getRootContent()`
    `void` | `init(org.eclipse.ui.IViewSite site, org.eclipse.ui.IMemento memento)`
    `void` | `load(PatternMatcherRootContentKey key, IModelConnector modelConnector)`
    `void` | `refreshPatternsViewer()` Calls refresh on the patterns tree viewer and ensures that "has children" state on the root elements are correct.
    `void` | `saveState(org.eclipse.ui.IMemento memento)`
    `void` | `setFocus()`
    `void` | `setHints(QueryEvaluationHint hints)`
    `void` | `setPackagePresentation(java.lang.String command, boolean update)`
    `void` | `unload(IModelConnector modelConnector)`
    `void` | `unload(PatternMatcherRootContentKey key)`

    - ### Methods inherited from class org.eclipse.ui.part.ViewPart

      `checkSite, getViewSite, init, setContentDescription, setInitializationData, setPartName`

    - ### Methods inherited from class org.eclipse.ui.part.WorkbenchPart

      `addPartPropertyListener, addPropertyListener, dispose, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy`

    - ### Methods inherited from class org.eclipse.core.commands.common.EventManager

      `addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject`

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

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

    - ### Methods inherited from interface org.eclipse.ui.IWorkbenchPart

      `addPropertyListener, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener`

    - ### Methods inherited from interface org.eclipse.core.runtime.IAdaptable

      `getAdapter`

- - ### Field Detail

    - #### QUERY_EXPLORER_ANNOTATION

          public static final java.lang.String QUERY_EXPLORER_ANNOTATION

      See Also:
        Constant Field Values

    - #### QUERY_EXPLORER_CHECKED_PARAMETER

          public static final java.lang.String QUERY_EXPLORER_CHECKED_PARAMETER

      See Also:
        Constant Field Values

    - #### ID

          public static final java.lang.String ID

      See Also:
        Constant Field Values

    - #### patternsViewerInput

          public static PatternsViewerInput patternsViewerInput

  - ### Constructor Detail

    - #### QueryExplorer

          public QueryExplorer()

  - ### Method Detail

    - #### getHints

          public QueryEvaluationHint getHints()

      Returns:
        the `QueryEvaluationHint` instance used when creating matchers

    - #### setHints

          public void setHints(QueryEvaluationHint hints)

      Parameters:
        `hints` - the hints to set
      Throws:
        `java.lang.NullPointerException` - if the given hint instance is null

    - #### getRootContent

          public RootContent getRootContent()

    - #### load

          public void load(PatternMatcherRootContentKey key,
                           IModelConnector modelConnector)

    - #### getModelConnector

          public IModelConnector getModelConnector(PatternMatcherRootContentKey key)

    - #### getPatternMatcherRootContentKeys

          public java.util.Collection<PatternMatcherRootContentKey> getPatternMatcherRootContentKeys()

    - #### unload

          public void unload(IModelConnector modelConnector)

    - #### unload

          public void unload(PatternMatcherRootContentKey key)

    - #### getInstance

          public static QueryExplorer getInstance()

    - #### getInstance

          public static QueryExplorer getInstance(org.eclipse.ui.IWorkbenchWindow activeWorkbenchWindow)

      Since:
        1.0

    - #### getMatcherTreeViewer

          public org.eclipse.jface.viewers.TreeViewer getMatcherTreeViewer()

    - #### getFlatContentProvider

          public PatternsViewerFlatContentProvider getFlatContentProvider()

    - #### getFlatLabelProvider

          public PatternsViewerFlatLabelProvider getFlatLabelProvider()

    - #### getHierarchicalContentProvider

          public PatternsViewerHierarchicalContentProvider getHierarchicalContentProvider()

    - #### getHierarchicalLabelProvider

          public PatternsViewerHierarchicalLabelProvider getHierarchicalLabelProvider()

    - #### init

          public void init(org.eclipse.ui.IViewSite site,
                           org.eclipse.ui.IMemento memento)
                    throws org.eclipse.ui.PartInitException

      Specified by:
        `init` in interface `org.eclipse.ui.IViewPart`
      Overrides:
        `init` in class `org.eclipse.ui.part.ViewPart`
      Throws:
        `org.eclipse.ui.PartInitException`

    - #### clearTableViewer

          public void clearTableViewer()

    - #### createPartControl

          public void createPartControl(org.eclipse.swt.widgets.Composite parent)

      Specified by:
        `createPartControl` in interface `org.eclipse.ui.IWorkbenchPart`
      Specified by:
        `createPartControl` in class `org.eclipse.ui.part.WorkbenchPart`

    - #### setFocus

          public void setFocus()

      Specified by:
        `setFocus` in interface `org.eclipse.ui.IWorkbenchPart`
      Specified by:
        `setFocus` in class `org.eclipse.ui.part.WorkbenchPart`

    - #### refreshPatternsViewer

          public void refreshPatternsViewer()

      Calls refresh on the patterns tree viewer and ensures that "has children" state on the root elements are correct.

    - #### getPatternsViewerRoot

          public PatternsViewerInput getPatternsViewerRoot()

    - #### getPatternsViewer

          public org.eclipse.jface.viewers.CheckboxTreeViewer getPatternsViewer()

    - #### getPatternsViewerFlyout

          public org.eclipse.viatra.query.tooling.ui.queryexplorer.content.flyout.FlyoutControlComposite getPatternsViewerFlyout()

      No Reference:
        This method is only intended to be used inside query explorer

    - #### saveState

          public void saveState(org.eclipse.ui.IMemento memento)

      Specified by:
        `saveState` in interface `org.eclipse.ui.IPersistable`
      Specified by:
        `saveState` in interface `org.eclipse.ui.IViewPart`
      Overrides:
        `saveState` in class `org.eclipse.ui.part.ViewPart`

    - #### setPackagePresentation

          public void setPackagePresentation(java.lang.String command,
                                             boolean update)