@Override public boolean accept(ICompilerProblem problem) { if ( problem.getLine() != lineNumber || compareStrings(this.fileName, problem.getSourcePath()) != 0 ) { this.lineNumber = problem.getLine(); this.fileName = problem.getSourcePath(); } else if ( parserProblemOnLine && (problem instanceof AbstractSemanticProblem || problem instanceof CodegenProblem) ) { // Skip this problem. return false; } this.parserProblemOnLine = problem instanceof IParserProblem; return true; }
@Override public boolean accept(ICompilerProblem problem) { if ( problem.getLine() != lineNumber || compareStrings(this.fileName, problem.getSourcePath()) != 0 ) { this.lineNumber = problem.getLine(); this.fileName = problem.getSourcePath(); } else if ( parserProblemOnLine && (problem instanceof AbstractSemanticProblem || problem instanceof CodegenProblem) ) { // Skip this problem. return false; } this.parserProblemOnLine = problem instanceof IParserProblem; return true; }
@Override public int compare(ICompilerProblem p1, ICompilerProblem p2) { int result = compareStrings( p1.getSourcePath(), p2.getSourcePath()); if ( result == 0 ) result = p1.getLine() - p2.getLine(); if ( result == 0 ) result = compareProblemClasses(p1, p2); return result; }
@Override public int compare(ICompilerProblem p1, ICompilerProblem p2) { int result = compareStrings( p1.getSourcePath(), p2.getSourcePath()); if ( result == 0 ) result = p1.getLine() - p2.getLine(); if ( result == 0 ) result = compareProblemClasses(p1, p2); return result; }
/** * Gets the text of the line specified problem occured or * <code>null</code> if there is no line information. * * @param problem problem to process * @return the text of the line or <code>null</code> if there * is no line information */ protected String getLineText(ICompilerProblem problem) { String filePath = problem.getSourcePath(); if (filePath == null) return null; int lineNumber = problem.getLine(); if (lineNumber < 0) return null; FileLineInfo fileLineInfo = readers.getUnchecked(filePath); return fileLineInfo.getLineText(lineNumber); }
/** * Gets the text of the line specified problem occured or * <code>null</code> if there is no line information. * * @param problem problem to process * @return the text of the line or <code>null</code> if there * is no line information */ protected String getLineText(ICompilerProblem problem) { String filePath = problem.getSourcePath(); if (filePath == null) return null; int lineNumber = problem.getLine(); if (lineNumber < 0) return null; FileLineInfo fileLineInfo = readers.getUnchecked(filePath); return fileLineInfo.getLineText(lineNumber); }
final String locationString = getLocationString(problem.getSourcePath(), problem.getLine(), problem.getColumn()); if (!locationString.isEmpty())
final String locationString = getLocationString(problem.getSourcePath(), problem.getLine(), problem.getColumn()); if (!locationString.isEmpty())
else break; // skip if IGNORE? CompilerMessage msg = new CompilerMessage(level, problem.getSourcePath(), problem.getLine() + 1, problem.getColumn()); try
break; // skip if IGNORE? CompilerMessage msg = new CompilerMessage(level, prob.getSourcePath(), prob.getLine() + 1, prob.getColumn()); try logger.log(msg, aClass.getField("errorCode").getInt(null), prob.getSourcePath()); logger.log(msg, aClass.getField("warningCode").getInt(null), prob.getSourcePath());
break; // skip if IGNORE? CompilerMessage msg = new CompilerMessage(level, prob.getSourcePath(), prob.getLine() + 1, prob.getColumn()); try logger.log(msg, aClass.getField("errorCode").getInt(null), prob.getSourcePath()); logger.log(msg, aClass.getField("warningCode").getInt(null), prob.getSourcePath());