Package com.google.code.vimsztool.compiler

Examples of com.google.code.vimsztool.compiler.JDTCompiler


 
  public String execute() {
    String classPathXml = params.get(SzjdeConstants.PARAM_CLASSPATHXML);
    String sourceFile = params.get(SzjdeConstants.PARAM_SOURCEFILE);
    CompilerContext cc=getCompilerContext(classPathXml);
    JDTCompiler compiler =new JDTCompiler(cc);
    String[] allSrcFiles = new String[] {};
    if (sourceFile.equals("All")) {
      allSrcFiles = cc.getAllSourceFiles();
    } else {
      ClassMetaInfoManager metaInfoManager = cc.getClassMetaInfoManager();
      String targetClassName=cc.buildClassName(sourceFile);
      Set<String> dependentClasses = metaInfoManager.getDependentClasses(targetClassName);
      List<String> srcFileList = new ArrayList<String>();
      for (String depClass : dependentClasses ) {
        String rtlPathName = depClass.replace(".", "/") + ".java";
        String sourcePath = cc.findSourceFileInSrcPath(rtlPathName);
        if (sourcePath != null ) {
          srcFileList.add(sourcePath);
        }
      }
      if (!srcFileList.contains(sourceFile)) {
        srcFileList.add(sourceFile);
      }
      allSrcFiles = srcFileList.toArray(new String[]{});
    }
   
    CompileResultInfo resultInfo =compiler.generateClass(allSrcFiles);
    List<String> problemList = resultInfo.getProblemInfoList();
    StringBuilder sb = new StringBuilder();
    for (String srcFile : allSrcFiles) {
      sb.append(srcFile).append("\n");
    }
View Full Code Here

TOP

Related Classes of com.google.code.vimsztool.compiler.JDTCompiler

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.