コード例 #1
0
  public List<SVDBDeclCacheItem> findCacheItem(String type_name) {
    List<SVDBDeclCacheItem> ret = new ArrayList<SVDBDeclCacheItem>();

    List<SVDBDeclCacheItem> found =
        fIndexIt.findGlobalScopeDecl(new NullProgressMonitor(), type_name, fMatcher);

    for (SVDBDeclCacheItem ci : found) {
      if (ci.getType() == SVDBItemType.ClassDecl) {
        ret.add(ci);
      }
    }

    return ret;
  }
コード例 #2
0
  @Override
  protected void fillContentProvider(
      AbstractContentProvider content_provider, ItemsFilter filter, IProgressMonitor monitor)
      throws CoreException {
    int count = 0;
    ISVDBIndexIterator index_it = fIndexIt;
    SubProgressMonitor find_monitor = new SubProgressMonitor(monitor, 1);
    List<SVDBDeclCacheItem> items =
        index_it.findGlobalScopeDecl(find_monitor, "", new SVDBAllTypeMatcher());

    synchronized (items) {
      for (SVDBDeclCacheItem i : items) {
        content_provider.add(i, filter);
        count++;
      }
    }

    System.out.println("Added " + count + " items");

    monitor.done();
  }