protected void report(Environment environment, CategorizedProblem problem) { if (problem == null) { throw new IllegalArgumentException("problem cannot be null"); } File file = new File(new String(problem.getOriginatingFileName())); String filename = file.getAbsolutePath(); String message = problem.getMessage() + " at " + filename + ":" + problem.getSourceLineNumber(); if (problem.isError()) { if (!environment.getNoClasspath()) { // by default, compilation errors are notified as exception throw new ModelBuildingException(message); } else { // in noclasspath mode, errors are only reported // but undefined import, type, and name errors are irrelevant int problemId = problem.getID(); if (problemId != IProblem.UndefinedType && problemId != IProblem.UndefinedName && problemId != IProblem.ImportNotFound) { environment.report(null, Level.WARN, message); } } } }
int endPosition = problem.getSourceEnd(); if (unitSource == null) { if (problem.getOriginatingFileName() != null) { try { unitSource = Util.getFileCharContent(new File(new String(problem.getOriginatingFileName())), null); } catch(IOException e) {
protected void report(Environment environment, CategorizedProblem problem) { if (problem == null) { throw new IllegalArgumentException("problem cannot be null"); } File file = new File(new String(problem.getOriginatingFileName())); String filename = file.getAbsolutePath(); String message = problem.getMessage() + " at " + filename + ":" + problem.getSourceLineNumber(); if (problem.isError()) { if (!environment.getNoClasspath()) { // by default, compilation errors are notified as exception throw new ModelBuildingException(message); } else { // in noclasspath mode, errors are only reported environment.report(null, problem.isError() ? Level.ERROR : Level.WARN, message); } } }
public static EclipseDiagnostic newInstance(CategorizedProblem problem, DefaultProblemFactory factory) { if(problem instanceof DefaultProblem) return newInstanceFromDefaultProblem((DefaultProblem) problem, factory); return new EclipseDiagnostic(getKind(problem), problem.getID(), problem.getArguments(), problem.getOriginatingFileName(), factory); }
public static EclipseDiagnostic newInstance(CategorizedProblem problem, DefaultProblemFactory factory) { if(problem instanceof DefaultProblem) return newInstanceFromDefaultProblem((DefaultProblem) problem, factory); return new EclipseDiagnostic(getKind(problem), problem.getID(), problem.getArguments(), problem.getOriginatingFileName(), factory); }
private void logProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount, char[] unitSource) { if ((this.tagBits & Logger.EMACS) != 0) { String result = (new String(problem.getOriginatingFileName()) + ":" //$NON-NLS-1$ + problem.getSourceLineNumber() "requestor.error", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName())) : this.main.bind( "requestor.warning", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName()))); try { final String errorReportSource = errorReportSource(problem, unitSource, 0);
private void logProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount, char[] unitSource) { if ((this.tagBits & Logger.EMACS) != 0) { String result = (new String(problem.getOriginatingFileName()) + ":" //$NON-NLS-1$ + problem.getSourceLineNumber() "requestor.error", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName())) : this.main.bind( "requestor.warning", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName()))); try { final String errorReportSource = errorReportSource(problem, unitSource, 0);
private void logProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount, char[] unitSource) { if ((this.tagBits & Logger.EMACS) != 0) { String result = (new String(problem.getOriginatingFileName()) + ":" //$NON-NLS-1$ + problem.getSourceLineNumber() "requestor.error", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName())) : this.main.bind( "requestor.warning", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName()))); try { final String errorReportSource = errorReportSource(problem, unitSource, 0);
private void logProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount, char[] unitSource) { if ((this.tagBits & Logger.EMACS) != 0) { String result = (new String(problem.getOriginatingFileName()) + ":" //$NON-NLS-1$ + problem.getSourceLineNumber() "requestor.error", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName())) : this.main.bind( "requestor.warning", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName()))); try { final String errorReportSource = errorReportSource(problem, unitSource, 0);
private void logProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount, char[] unitSource) { if ((this.tagBits & Logger.EMACS) != 0) { String result = (new String(problem.getOriginatingFileName()) + ":" //$NON-NLS-1$ + problem.getSourceLineNumber() "requestor.error", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName())) : this.main.bind( "requestor.warning", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName()))); try { final String errorReportSource = errorReportSource(problem, unitSource, 0);
private void logProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount, char[] unitSource) { if ((this.tagBits & Logger.EMACS) != 0) { String result = (new String(problem.getOriginatingFileName()) + ":" //$NON-NLS-1$ + problem.getSourceLineNumber() "requestor.error", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName())) : this.main.bind( "requestor.warning", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName()))); try { final String errorReportSource = errorReportSource(problem, unitSource, 0);
private void logProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount, char[] unitSource) { if ((this.tagBits & Logger.EMACS) != 0) { String result = (new String(problem.getOriginatingFileName()) + ":" //$NON-NLS-1$ + problem.getSourceLineNumber() "requestor.error", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName())) : this.main.bind( "requestor.warning", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName()))); try { final String errorReportSource = errorReportSource(problem, unitSource, 0);
private void logProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount, char[] unitSource) { if ((this.tagBits & Logger.EMACS) != 0) { String result = (new String(problem.getOriginatingFileName()) + ":" //$NON-NLS-1$ + problem.getSourceLineNumber() "requestor.error", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName())) : this.main.bind( "requestor.warning", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName()))); try { final String errorReportSource = errorReportSource(problem, unitSource, 0);
private void logProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount, char[] unitSource) { if ((this.tagBits & Logger.EMACS) != 0) { String result = (new String(problem.getOriginatingFileName()) + ":" //$NON-NLS-1$ + problem.getSourceLineNumber() "requestor.error", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName())) : this.main.bind( "requestor.warning", //$NON-NLS-1$ Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName()))); try { final String errorReportSource = errorReportSource(problem, unitSource, 0);
problem.isInfo() ? "output.emacs.info" //$NON-NLS-1$ : "output.emacs.warning"; //$NON-NLS-1$ String result = (new String(problem.getOriginatingFileName()) + ":" //$NON-NLS-1$ + problem.getSourceLineNumber() printErr(this.main.bind(severity, Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName()))); try { final String errorReportSource = errorReportSource(problem, unitSource, 0);
problem.isInfo() ? "output.emacs.info" //$NON-NLS-1$ : "output.emacs.warning"; //$NON-NLS-1$ String result = (new String(problem.getOriginatingFileName()) + ":" //$NON-NLS-1$ + problem.getSourceLineNumber() printErr(this.main.bind(severity, Integer.toString(globalErrorCount), new String(problem.getOriginatingFileName()))); try { final String errorReportSource = errorReportSource(problem, unitSource, 0);
private void logExtraProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount) { char[] originatingFileName = problem.getOriginatingFileName(); String fileName = originatingFileName == null
private void logExtraProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount) { char[] originatingFileName = problem.getOriginatingFileName(); if (originatingFileName == null) {
CategorizedProblem problem = problems[i]; String msg = problem.getMessage(); String fileName = CharOperation.charToString(problem.getOriginatingFileName()); int line = problem.getSourceLineNumber(); int pos = problem.getSourceStart();
private void logExtraProblem(CategorizedProblem problem, int localErrorCount, int globalErrorCount) { char[] originatingFileName = problem.getOriginatingFileName(); if (originatingFileName == null) {