Пример #1
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();
  }
Пример #2
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;
  }
Пример #3
0
  private void assertNoErrors(LogHandle log, ISVDBIndexIterator index_it) {
    ISVDBItemIterator it_i = index_it.getItemIterator(new NullProgressMonitor());
    List<SVDBMarker> errors = new ArrayList<SVDBMarker>();

    while (it_i.hasNext()) {
      ISVDBItemBase it = it_i.nextItem();
      if (it.getType() == SVDBItemType.Marker) {
        SVDBMarker marker = (SVDBMarker) it;
        if (marker.getMarkerType() == MarkerType.Error) {
          errors.add(marker);
        }
      }
    }

    for (SVDBMarker m : errors) {
      log.debug("[ERROR] " + m.getMessage() + " @ " + ":" + m.getLocation().getLine());
    }

    assertEquals(0, errors.size());
  }