Package org.aspectj.org.eclipse.jdt.internal.core.dom.rewrite

Examples of org.aspectj.org.eclipse.jdt.internal.core.dom.rewrite.ImportRewriteAnalyzer


        parser.setFocalPosition(0); // reduced AST
        parser.setResolveBindings(false);
        usedAstRoot= (CompilationUnit) parser.createAST(new SubProgressMonitor(monitor, 1));
      }
           
      ImportRewriteAnalyzer computer= new ImportRewriteAnalyzer(this.compilationUnit, usedAstRoot, this.importOrder, this.importOnDemandThreshold, this.staticImportOnDemandThreshold, this.restoreExistingImports);
      computer.setFilterImplicitImports(this.filterImplicitImports);
     
      if (this.addedImports != null) {
        for (int i= 0; i < this.addedImports.size(); i++) {
          String curr= (String) this.addedImports.get(i);
          computer.addImport(curr.substring(1), STATIC_PREFIX == curr.charAt(0));
        }
      }
     
      if (this.removedImports != null) {
        for (int i= 0; i < this.removedImports.size(); i++) {
          String curr= (String) this.removedImports.get(i);
          computer.removeImport(curr.substring(1), STATIC_PREFIX == curr.charAt(0));
        }
      }
       
      TextEdit result= computer.getResultingEdits(new SubProgressMonitor(monitor, 1));
      this.createdImports= computer.getCreatedImports();
      this.createdStaticImports= computer.getCreatedStaticImports();
      return result;
    } finally {
      monitor.done();
    }
  }
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.core.dom.rewrite.ImportRewriteAnalyzer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.