/** * Returns the evaluation results that converts the given compilation result that has problems. * If the compilation result has more than one problem, then the problems are broken down so that * each evaluation result has the same evaluation id. */ protected EvaluationResult[] evaluationResultsForCompilationProblems(CompilationResult result, char[] cuSource) { // Break down the problems and group them by ids in evaluation results CategorizedProblem[] problems = result.getAllProblems(); HashMap resultsByIDs = new HashMap(5); for (int i = 0; i < problems.length; i++) { addEvaluationResultForCompilationProblem(resultsByIDs, problems[i], cuSource); } // Copy results int size = resultsByIDs.size(); EvaluationResult[] evalResults = new EvaluationResult[size]; Iterator results = resultsByIDs.values().iterator(); for (int i = 0; i < size; i++) { evalResults[i] = (EvaluationResult)results.next(); } return evalResults; } /**
/** * Returns the evaluation results that converts the given compilation result that has problems. * If the compilation result has more than one problem, then the problems are broken down so that * each evaluation result has the same evaluation id. */ protected EvaluationResult[] evaluationResultsForCompilationProblems(CompilationResult result, char[] cuSource) { // Break down the problems and group them by ids in evaluation results CategorizedProblem[] problems = result.getAllProblems(); HashMap<char[], EvaluationResult> resultsByIDs = new HashMap<>(5); for (int i = 0; i < problems.length; i++) { addEvaluationResultForCompilationProblem(resultsByIDs, problems[i], cuSource); } // Copy results int size = resultsByIDs.size(); EvaluationResult[] evalResults = new EvaluationResult[size]; Iterator<EvaluationResult> results = resultsByIDs.values().iterator(); for (int i = 0; i < size; i++) { evalResults[i] = results.next(); } return evalResults; } /**
/** * Returns the evaluation results that converts the given compilation result that has problems. * If the compilation result has more than one problem, then the problems are broken down so that * each evaluation result has the same evaluation id. */ protected EvaluationResult[] evaluationResultsForCompilationProblems(CompilationResult result, char[] cuSource) { // Break down the problems and group them by ids in evaluation results CategorizedProblem[] problems = result.getAllProblems(); HashMap<char[], EvaluationResult> resultsByIDs = new HashMap<>(5); for (int i = 0; i < problems.length; i++) { addEvaluationResultForCompilationProblem(resultsByIDs, problems[i], cuSource); } // Copy results int size = resultsByIDs.size(); EvaluationResult[] evalResults = new EvaluationResult[size]; Iterator<EvaluationResult> results = resultsByIDs.values().iterator(); for (int i = 0; i < size; i++) { evalResults[i] = results.next(); } return evalResults; } /**
/** * Returns the evaluation results that converts the given compilation result that has problems. * If the compilation result has more than one problem, then the problems are broken down so that * each evaluation result has the same evaluation id. */ protected EvaluationResult[] evaluationResultsForCompilationProblems(CompilationResult result, char[] cuSource) { // Break down the problems and group them by ids in evaluation results CategorizedProblem[] problems = result.getAllProblems(); HashMap<char[], EvaluationResult> resultsByIDs = new HashMap<>(5); for (int i = 0; i < problems.length; i++) { addEvaluationResultForCompilationProblem(resultsByIDs, problems[i], cuSource); } // Copy results int size = resultsByIDs.size(); EvaluationResult[] evalResults = new EvaluationResult[size]; Iterator<EvaluationResult> results = resultsByIDs.values().iterator(); for (int i = 0; i < size; i++) { evalResults[i] = results.next(); } return evalResults; } /**
/** * Returns the evaluation results that converts the given compilation result that has problems. * If the compilation result has more than one problem, then the problems are broken down so that * each evaluation result has the same evaluation id. */ protected EvaluationResult[] evaluationResultsForCompilationProblems(CompilationResult result, char[] cuSource) { // Break down the problems and group them by ids in evaluation results CategorizedProblem[] problems = result.getAllProblems(); HashMap resultsByIDs = new HashMap(5); for (int i = 0; i < problems.length; i++) { addEvaluationResultForCompilationProblem(resultsByIDs, problems[i], cuSource); } // Copy results int size = resultsByIDs.size(); EvaluationResult[] evalResults = new EvaluationResult[size]; Iterator results = resultsByIDs.values().iterator(); for (int i = 0; i < size; i++) { evalResults[i] = (EvaluationResult)results.next(); } return evalResults; } /**
/** * Returns the evaluation results that converts the given compilation result that has problems. * If the compilation result has more than one problem, then the problems are broken down so that * each evaluation result has the same evaluation id. */ protected EvaluationResult[] evaluationResultsForCompilationProblems(CompilationResult result, char[] cuSource) { // Break down the problems and group them by ids in evaluation results CategorizedProblem[] problems = result.getAllProblems(); HashMap resultsByIDs = new HashMap(5); for (int i = 0; i < problems.length; i++) { addEvaluationResultForCompilationProblem(resultsByIDs, problems[i], cuSource); } // Copy results int size = resultsByIDs.size(); EvaluationResult[] evalResults = new EvaluationResult[size]; Iterator results = resultsByIDs.values().iterator(); for (int i = 0; i < size; i++) { evalResults[i] = (EvaluationResult)results.next(); } return evalResults; } /**
private void reportProblems(CompilationResult result) { for (CategorizedProblem problem : result.getAllProblems()) { EclipseDiagnostic diagnostic = EclipseDiagnostic.newInstance(problem, this.problemFactory); this.diagnosticListener.report(diagnostic); } } }
@Override protected void reportProblems(CompilationResult result) { if (this.diagnosticListener != null) { for (CategorizedProblem problem : result.getAllProblems()) { EclipseDiagnostic diagnostic = EclipseDiagnostic.newInstance(problem, this.problemFactory); this.diagnosticListener.report(diagnostic); } } } }
private void reportProblems(CompilationResult result) { for (CategorizedProblem problem : result.getAllProblems()) { EclipseDiagnostic diagnostic = EclipseDiagnostic.newInstance(problem, this.problemFactory); this.diagnosticListener.report(diagnostic); } } }
@Override protected void reportProblems(CompilationResult result) { if (this.diagnosticListener != null) { for (CategorizedProblem problem : result.getAllProblems()) { EclipseDiagnostic diagnostic = EclipseDiagnostic.newInstance(problem, this.problemFactory); this.diagnosticListener.report(diagnostic); } } } }
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(); }