public void acceptResult(CompilationResult result) { boolean hasErrors = false; if (result.hasProblems()) { problems = result.getProblems(); } if (!hasErrors) { ClassFile[] classFiles = result.getClassFiles(); for (int i = 0; i < classFiles.length; i++) { ClassFile classFile = classFiles[i]; char[][] compoundName = classFile.getCompoundName(); StringBuilder className = new StringBuilder(); String sep = ""; for (int j = 0; j < compoundName.length; j++) { className.append(sep); className.append(new String(compoundName[j])); sep = "."; } byte[] bytes = classFile.getBytes(); compiledClassFiles.put(className.toString(), bytes); } } } }
public void acceptResult( org.eclipse.jdt.internal.compiler.CompilationResult result ) { if (result.hasProblems()) { if (result.hasErrors()) hasErrors = true; problems.addAll(Arrays.asList((IProblem[]) result.getProblems())); } if (!result.hasErrors()) { ClassFile[] clazzFiles = result.getClassFiles(); for (ClassFile clazzFile : clazzFiles) { char[][] compoundName = clazzFile.getCompoundName(); StringBuffer clazzName = new StringBuffer(); for (char[] part : compoundName) { if (clazzName.length() > 0) { clazzName.append('.'); } clazzName.append(part); } byteCode.put(clazzName.toString(), clazzFile.getBytes()); } } } }
public void acceptResult( final CompilationResult pResult ) { if (pResult.hasProblems()) { for (IProblem iproblem : pResult.getProblems()) { final CompilationProblem problem = new EclipseCompilationProblem(iproblem); if (problemHandler != null) { problemHandler.handle(problem); } problems.add(problem); } } if (!pResult.hasErrors()) { final ClassFile[] clazzFiles = pResult.getClassFiles(); for (ClassFile clazzFile : clazzFiles) { final char[][] compoundName = clazzFile.getCompoundName(); final StringBuilder clazzName = new StringBuilder(); for (int j = 0; j < compoundName.length; j++) { if (j != 0) { clazzName.append('.'); } clazzName.append(compoundName[j]); } pStore.write(clazzName.toString().replace('.', '/') + ".class", clazzFile.getBytes()); } } } };
public void acceptResult( final CompilationResult pResult ) { if (pResult.hasProblems()) { final IProblem[] iproblems = pResult.getProblems(); for (int i = 0; i < iproblems.length; i++) { final IProblem iproblem = iproblems[i]; final CompilationProblem problem = new EclipseCompilationProblem(iproblem); if (problemHandler != null) { problemHandler.handle(problem); } problems.add(problem); } } if (!pResult.hasErrors()) { final ClassFile[] clazzFiles = pResult.getClassFiles(); for (int i = 0; i < clazzFiles.length; i++) { final ClassFile clazzFile = clazzFiles[i]; final char[][] compoundName = clazzFile.getCompoundName(); final StringBuilder clazzName = new StringBuilder(); for (int j = 0; j < compoundName.length; j++) { if (j != 0) { clazzName.append('.'); } clazzName.append(compoundName[j]); } pStore.write(clazzName.toString().replace('.', '/') + ".class", clazzFile.getBytes()); } } } };
@Override public void acceptResult(CompilationResult result) { try { if (result.hasProblems()) { IProblem[] problems = result.getProblems(); for (int i = 0; i < problems.length; i++) {
@Override public void acceptResult(CompilationResult result) { try { if (result.hasProblems()) { IProblem[] problems = result.getProblems(); for (int i = 0; i < problems.length; i++) {
public void acceptResult(CompilationResult result) { if (result.hasProblems()) { if (pProblemHandler != null) { final IProblem[] problems = result.getProblems(); for (int i = 0; i < problems.length; i++) { final IProblem problem = problems[i]; pProblemHandler.handle(new EclipseCompilationProblem(problem)); } } } if (!result.hasErrors()) { final ClassFile[] clazzFiles = result.getClassFiles(); for (int i = 0; i < clazzFiles.length; i++) { final ClassFile clazzFile = clazzFiles[i]; final char[][] compoundName = clazzFile.getCompoundName(); final StringBuffer clazzName = new StringBuffer(); for (int j = 0; j < compoundName.length; j++) { if (j != 0) { clazzName.append('.'); } clazzName.append(compoundName[j]); } pStore.write(clazzName.toString(), clazzFile.getBytes()); } } } };
if (result.hasProblems()) { for (CategorizedProblem problem : result.getProblems()) { if (problem.isError() || isShowWarnings()) {
if (result.hasProblems()) { for (CategorizedProblem problem : result.getProblems()) { if (problem.isError() || isShowWarnings()) {
public void acceptResult(CompilationResult compilationResult) { if (compilationResult.lineSeparatorPositions != null) { int unitLineCount = compilationResult.lineSeparatorPositions.length; this.lineDelta += unitLineCount; if (Main.this.showProgress && this.lineDelta > 2000) { // in -log mode, dump a dot every 2000 lines compiled Main.this.logger.logProgress(); this.lineDelta = 0; } } Main.this.logger.startLoggingSource(compilationResult); if (compilationResult.hasProblems() || compilationResult.hasTasks()) { Main.this.logger.logProblems(compilationResult.getAllProblems(), compilationResult.compilationUnit.getContents(), Main.this); } outputClassFiles(compilationResult); Main.this.logger.endLoggingSource(); } };
public void acceptResult(CompilationResult compilationResult) { if (compilationResult.lineSeparatorPositions != null) { int unitLineCount = compilationResult.lineSeparatorPositions.length; this.lineDelta += unitLineCount; if (Main.this.showProgress && this.lineDelta > 2000) { // in -log mode, dump a dot every 2000 lines compiled Main.this.logger.logProgress(); this.lineDelta = 0; } } Main.this.logger.startLoggingSource(compilationResult); if (compilationResult.hasProblems() || compilationResult.hasTasks()) { Main.this.logger.logProblems(compilationResult.getAllProblems(), compilationResult.compilationUnit.getContents(), Main.this); } outputClassFiles(compilationResult); Main.this.logger.endLoggingSource(); } };
public void acceptResult(CompilationResult compilationResult) { if (compilationResult.lineSeparatorPositions != null) { int unitLineCount = compilationResult.lineSeparatorPositions.length; this.lineDelta += unitLineCount; if (Main.this.showProgress && this.lineDelta > 2000) { // in -log mode, dump a dot every 2000 lines compiled Main.this.logger.logProgress(); this.lineDelta = 0; } } Main.this.logger.startLoggingSource(compilationResult); if (compilationResult.hasProblems() || compilationResult.hasTasks()) { Main.this.logger.logProblems(compilationResult.getAllProblems(), compilationResult.compilationUnit.getContents(), Main.this); } outputClassFiles(compilationResult); Main.this.logger.endLoggingSource(); } };
@Override public void acceptResult(CompilationResult compilationResult) { if (compilationResult.lineSeparatorPositions != null) { int unitLineCount = compilationResult.lineSeparatorPositions.length; this.lineDelta += unitLineCount; if (this.compiler.showProgress && this.lineDelta > 2000) { // in -log mode, dump a dot every 2000 lines compiled this.compiler.logger.logProgress(); this.lineDelta = 0; } } this.compiler.logger.startLoggingSource(compilationResult); if (compilationResult.hasProblems() || compilationResult.hasTasks()) { this.compiler.logger.logProblems(compilationResult.getAllProblems(), compilationResult.compilationUnit.getContents(), this.compiler); reportProblems(compilationResult); } this.compiler.outputClassFiles(compilationResult); this.compiler.logger.endLoggingSource(); }
@Override public void acceptResult(CompilationResult compilationResult) { if (compilationResult.lineSeparatorPositions != null) { int unitLineCount = compilationResult.lineSeparatorPositions.length; this.lineDelta += unitLineCount; if (this.compiler.showProgress && this.lineDelta > 2000) { // in -log mode, dump a dot every 2000 lines compiled this.compiler.logger.logProgress(); this.lineDelta = 0; } } this.compiler.logger.startLoggingSource(compilationResult); if (compilationResult.hasProblems() || compilationResult.hasTasks()) { this.compiler.logger.logProblems(compilationResult.getAllProblems(), compilationResult.compilationUnit.getContents(), this.compiler); reportProblems(compilationResult); } this.compiler.outputClassFiles(compilationResult); this.compiler.logger.endLoggingSource(); }
@Override public void acceptResult(CompilationResult compilationResult) { if (compilationResult.lineSeparatorPositions != null) { int unitLineCount = compilationResult.lineSeparatorPositions.length; this.lineDelta += unitLineCount; if (this.compiler.showProgress && this.lineDelta > 2000) { // in -log mode, dump a dot every 2000 lines compiled this.compiler.logger.logProgress(); this.lineDelta = 0; } } this.compiler.logger.startLoggingSource(compilationResult); if (compilationResult.hasProblems() || compilationResult.hasTasks()) { this.compiler.logger.logProblems(compilationResult.getAllProblems(), compilationResult.compilationUnit.getContents(), this.compiler); reportProblems(compilationResult); } this.compiler.outputClassFiles(compilationResult); this.compiler.logger.endLoggingSource(); }
@Override public void acceptResult(CompilationResult compilationResult) { if (compilationResult.lineSeparatorPositions != null) { int unitLineCount = compilationResult.lineSeparatorPositions.length; this.lineDelta += unitLineCount; if (this.compiler.showProgress && this.lineDelta > 2000) { // in -log mode, dump a dot every 2000 lines compiled this.compiler.logger.logProgress(); this.lineDelta = 0; } } this.compiler.logger.startLoggingSource(compilationResult); if (compilationResult.hasProblems() || compilationResult.hasTasks()) { this.compiler.logger.logProblems(compilationResult.getAllProblems(), compilationResult.compilationUnit.getContents(), this.compiler); reportProblems(compilationResult); } this.compiler.outputClassFiles(compilationResult); this.compiler.logger.endLoggingSource(); }
@Override public void acceptResult(CompilationResult compilationResult) { if (compilationResult.lineSeparatorPositions != null) { int unitLineCount = compilationResult.lineSeparatorPositions.length; this.lineDelta += unitLineCount; if (this.compiler.showProgress && this.lineDelta > 2000) { // in -log mode, dump a dot every 2000 lines compiled this.compiler.logger.logProgress(); this.lineDelta = 0; } } this.compiler.logger.startLoggingSource(compilationResult); if (compilationResult.hasProblems() || compilationResult.hasTasks()) { this.compiler.logger.logProblems(compilationResult.getAllProblems(), compilationResult.compilationUnit.getContents(), this.compiler); reportProblems(compilationResult); } this.compiler.outputClassFiles(compilationResult); this.compiler.logger.endLoggingSource(); }
@Override public void acceptResult(CompilationResult compilationResult) { if (compilationResult.lineSeparatorPositions != null) { int unitLineCount = compilationResult.lineSeparatorPositions.length; this.lineDelta += unitLineCount; if (this.compiler.showProgress && this.lineDelta > 2000) { // in -log mode, dump a dot every 2000 lines compiled this.compiler.logger.logProgress(); this.lineDelta = 0; } } this.compiler.logger.startLoggingSource(compilationResult); if (compilationResult.hasProblems() || compilationResult.hasTasks()) { this.compiler.logger.logProblems( compilationResult.getAllProblems(), compilationResult.compilationUnit.getContents(), this.compiler); reportProblems(compilationResult); } this.compiler.outputClassFiles(compilationResult); this.compiler.logger.endLoggingSource(); }
@Override public void acceptResult(CompilationResult compilationResult) { if (compilationResult.lineSeparatorPositions != null) { int unitLineCount = compilationResult.lineSeparatorPositions.length; this.lineDelta += unitLineCount; if (this.compiler.showProgress && this.lineDelta > 2000) { // in -log mode, dump a dot every 2000 lines compiled this.compiler.logger.logProgress(); this.lineDelta = 0; } } this.compiler.logger.startLoggingSource(compilationResult); if (compilationResult.hasProblems() || compilationResult.hasTasks()) { this.compiler.logger.logProblems( compilationResult.getAllProblems(), compilationResult.compilationUnit.getContents(), this.compiler); reportProblems(compilationResult); } this.compiler.outputClassFiles(compilationResult); this.compiler.logger.endLoggingSource(); }
if (result.hasProblems()) { CategorizedProblem[] problems = result.getProblems(); for (int i = 0; i < problems.length; i++) {