Example #1
0
 @Override
 public void visitArchive(IFile jar) {
   if (knownArchives.add(jar)) {
     System.out.println("jar: " + jar.name());
     ecj.addClasspathEntry(jar);
   }
 }
Example #2
0
  @Override
  public void visitSourceFolder(IFile sourceFolder) {
    sourceFolder.accept(
        new FileVisitor() {

          @Override
          public void visit(IFile child) {
            if (child.isFile() && child.name().toLowerCase().endsWith(".java")) {
              if (knownSources.add(child)) {
                ecj.addSourceFile(child);
              }
            } else if (child.isDirectory()) {
              child.accept(this);
            }
          }
        });
  }