mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 18:55:38 +02:00
Fix to PR 53253
This commit is contained in:
parent
183e1ab403
commit
9bd8b6fb3a
2 changed files with 54 additions and 39 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-03-01 Alain Magloire
|
||||
|
||||
Fix to PR 53253. From Steve Garbarini
|
||||
|
||||
* src/org/eclipse/cdt/internal/errorparsers/VCErrorParser.java
|
||||
|
||||
2004-03-01 Alain Magloire
|
||||
|
||||
Patch from Uwe Stieber
|
||||
|
|
|
@ -1,24 +1,33 @@
|
|||
package org.eclipse.cdt.internal.errorparsers;
|
||||
|
||||
/*
|
||||
* (c) Copyright IBM Corp. 2000, 2001.
|
||||
* All Rights Reserved.
|
||||
* (c) Copyright IBM Corp. 2000, 2001. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.eclipse.cdt.core.ErrorParserManager;
|
||||
import org.eclipse.cdt.core.IErrorParser;
|
||||
import org.eclipse.cdt.core.IMarkerGenerator;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
|
||||
public class VCErrorParser implements IErrorParser {
|
||||
|
||||
public boolean processLine(String line, ErrorParserManager eoParser) {
|
||||
// msdev: filname(linenumber) : error/warning error_desc
|
||||
int firstColon = line.indexOf(':');
|
||||
if (firstColon != -1) {
|
||||
/* Guard against drive in Windows platform. */
|
||||
if (firstColon == 1) {
|
||||
try {
|
||||
String os = System.getProperty("os.name");
|
||||
if (os != null && os.startsWith("Win")) {
|
||||
try {
|
||||
if (Character.isLetter(line.charAt(0))) {
|
||||
firstColon = line.indexOf(':', 2);
|
||||
}
|
||||
} catch (StringIndexOutOfBoundsException e) {
|
||||
}
|
||||
}
|
||||
} catch (SecurityException e) {
|
||||
}
|
||||
}
|
||||
String firstPart = line.substring(0, firstColon);
|
||||
StringTokenizer tok = new StringTokenizer(firstPart, "()");
|
||||
if (tok.hasMoreTokens()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue