Ejemplo n.º 1
0
  // filtering things...
  protected void setFilter(String text, IProgressMonitor monitor, boolean updateFilterMatcher) {
    if (monitor.isCanceled()) return;

    if (updateFilterMatcher) {
      // just so that subclasses may already treat it.
      if (fFilterMatcher.lastPattern.equals(text)) {
        // no actual change...
        return;
      }
      fFilterMatcher.setFilter(text);
      if (monitor.isCanceled()) return;
    }

    getTreeViewer().getTree().setRedraw(false);
    getTreeViewer().getTree().getParent().setRedraw(false);
    try {
      if (monitor.isCanceled()) return;
      getTreeViewer().refresh();
      if (monitor.isCanceled()) return;
      getTreeViewer().expandAll();
    } finally {
      getTreeViewer().getTree().setRedraw(true);
      getTreeViewer().getTree().getParent().setRedraw(true);
    }
  }
  // filtering things...
  protected void setFilter(String text, IProgressMonitor monitor, boolean updateFilterMatcher) {
    if (monitor.isCanceled()) {
      return;
    }

    if (updateFilterMatcher) {
      // just so that subclasses may already treat it.
      if (fFilterMatcher.lastPattern.equals(text)) {
        // no actual change...
        return;
      }
      fFilterMatcher.setFilter(text);
      if (monitor.isCanceled()) {
        return;
      }
    }

    getViewer().refresh();
    setSelectedElementChecked();
  }
 protected boolean matchExceptionToShowInList(Object element) {
   return fFilterMatcher.match(element);
 }
Ejemplo n.º 4
0
 /**
  * In the default implementation, an item goes to the tree if the filter can properly match it
  * (but subclasses may override if their understanding of what goes into the tree is not decided
  * solely by that).
  */
 protected boolean matchItemToShowInTree(Object element) {
   return fFilterMatcher.match(element);
 }