# HG changeset patch # User ssobek # Date 1240242465 18000 # Node ID 508f2f2592b22c5993e91a1ede1b25cfe7a74792 # Parent b7cd497951b75c707790b749c0df40878a7113d8 fixed Bug 8850 "Errors in the .pkg file are not marked in the editor." diff -r b7cd497951b7 -r 508f2f2592b2 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/error/parsers/MakeSisErrorParser.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/error/parsers/MakeSisErrorParser.java Thu Apr 16 14:40:22 2009 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/error/parsers/MakeSisErrorParser.java Mon Apr 20 10:47:45 2009 -0500 @@ -22,19 +22,37 @@ public class MakeSisErrorParser extends CarbideBaseErrorParser { + String packageFile = null; + public MakeSisErrorParser() { } public boolean processLine(String aLine, ErrorParserManager aErrorParserManager) { - // Known patterns. + // Known patterns: + // // (a) // filename(lineno) : description + // OR + // (lineno) : description // // (b) // filename(lineno) : Warning: description + // OR + // (lineno) : Warning: description // // (c) // filename(lineno) : Error: description + // OR + // (lineno) : Error: description + + if ( aLine.contains("makesis.exe ")) { + int packageStart = aLine.indexOf("makesis.exe ") + "makesis.exe ".length(); + int packageEnd = aLine.indexOf(' ', packageStart); + // store the name of the package file for cases above where + // the line number is shown without the package filename + if (packageEnd != -1) + packageFile = aLine.substring(packageStart, packageEnd); + } if (aLine.equalsIgnoreCase("error: invalid destination file")){ msgSeverity = IMarkerGenerator.SEVERITY_ERROR_BUILD; @@ -46,6 +64,17 @@ aErrorParserManager.generateMarker(null, -1, aLine, msgSeverity, null); } + // if line starts with (lineno):, prefix it with the package file name + if ( aLine.indexOf(':') >= 2 + && aLine.charAt(0) == '(' + && aLine.charAt(aLine.indexOf(':') - 2) == ')') { + try { + Integer.parseInt(aLine.substring(1, aLine.indexOf(':') - 2)); + aLine = packageFile + aLine; + } catch (NumberFormatException nfe) { + } + } + if (!setFirstColon(aLine)) { return false; }