private void initPatternsViewerWithGeneratedPatterns() {
    for (IQuerySpecification<?> pattern :
        QueryExplorerPatternRegistry.getGeneratedQuerySpecifications()) {
      String patternFqn = pattern.getFullyQualifiedName();
      QueryExplorerPatternRegistry.getInstance().addGeneratedPattern(pattern);
      QueryExplorerPatternRegistry.getInstance().addActivePattern(pattern);
      patternsViewerInput.getGeneratedPatternsRoot().addComponent(patternFqn);
    }

    patternsTreeViewer.refresh();
    patternsViewerInput.getGeneratedPatternsRoot().updateSelection(patternsTreeViewer);
  }
  public void addMatcher(
      IncQueryEngine engine, IQuerySpecification<?> specification, boolean generated) {
    String fqn = specification.getFullyQualifiedName();

    PatternMatcherContent pm = new PatternMatcherContent(this, engine, specification, generated);
    this.mapping.put(fqn, pm);

    if (generated) {
      // generated matchers are inserted in front of the list
      this.children.addChild(0, pm);
    } else {
      // generic matchers are inserted in the list according to the order in the eiq file
      this.children.addChild(pm);
    }
  }
 public void unregisterPattern(IQuerySpecification<?> specification) {
   removeMatcher(specification.getFullyQualifiedName());
 }