mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix PR 42501.
Make: *** Warning: File .. has modification time in the future This is now a warning in the Task bar.
This commit is contained in:
parent
68beea8757
commit
4baaaf3c10
1 changed files with 22 additions and 10 deletions
|
@ -17,23 +17,26 @@ public class MakeErrorParser implements IErrorParser {
|
|||
|
||||
static int getDirectoryLevel(String line) {
|
||||
int s = line.indexOf('[');
|
||||
int num = 0;
|
||||
if (s != -1) {
|
||||
int e = line.indexOf(']');
|
||||
String number = line.substring(s + 1, e);
|
||||
int num= Integer.parseInt(number);
|
||||
return num;
|
||||
String number = line.substring(s + 1, e).trim();
|
||||
try {
|
||||
num = Integer.parseInt(number);
|
||||
} catch (NumberFormatException exc) {
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return num;
|
||||
}
|
||||
|
||||
public boolean processLine(String line, ErrorParserManager eoParser) {
|
||||
// make\[[0-9]*\]: error_desc
|
||||
int firstColon= line.indexOf(':');
|
||||
if (firstColon != -1 && line.startsWith("make")) {
|
||||
if (firstColon != -1 && line.startsWith("make")) { //$NON-NLS-1$
|
||||
boolean enter = false;
|
||||
String msg= line.substring(firstColon + 1);
|
||||
if ((enter = msg.startsWith(" Entering directory")) ||
|
||||
(msg.startsWith(" Leaving directory"))) {
|
||||
String msg= line.substring(firstColon + 1).trim();
|
||||
if ((enter = msg.startsWith("Entering directory")) || //$NON-NLS-1$
|
||||
(msg.startsWith("Leaving directory"))) { //$NON-NLS-1$
|
||||
int s = msg.indexOf('`');
|
||||
int e = msg.indexOf('\'');
|
||||
if (s != -1 && e != -1) {
|
||||
|
@ -54,8 +57,17 @@ public class MakeErrorParser implements IErrorParser {
|
|||
/* Could check to see if they match */
|
||||
}
|
||||
}
|
||||
} else if (msg.startsWith(" ***")) {
|
||||
eoParser.generateMarker(null, -1, msg, IMarkerGenerator.SEVERITY_ERROR_BUILD, null);
|
||||
} else if (msg.startsWith("***")) { //$NON-NLS-1$
|
||||
boolean warning = false;
|
||||
if (msg.length() > 4) {
|
||||
String s = msg.substring(3).trim();
|
||||
warning = s.startsWith("Warning"); //$NON-NLS-1$
|
||||
}
|
||||
if (warning) {
|
||||
eoParser.generateMarker(null, -1, msg, IMarkerGenerator.SEVERITY_WARNING, null);
|
||||
} else {
|
||||
eoParser.generateMarker(null, -1, msg, IMarkerGenerator.SEVERITY_ERROR_BUILD, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue