1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

bug 287098: Empty external location showing up in Problems View

This commit is contained in:
Andrew Gvozdev 2009-08-19 16:59:56 +00:00
parent 5e25a3f3e2
commit a4d4297044

View file

@ -55,7 +55,7 @@ public abstract class ACBuilder extends IncrementalProjectBuilder implements IMa
* Try to find matching markers and don't put in duplicates * Try to find matching markers and don't put in duplicates
*/ */
String externalLocation = null; String externalLocation = null;
if (problemMarkerInfo.externalPath != null) { if (problemMarkerInfo.externalPath != null && ! problemMarkerInfo.externalPath.isEmpty()) {
externalLocation = problemMarkerInfo.externalPath.toOSString(); externalLocation = problemMarkerInfo.externalPath.toOSString();
} }
if ((cur != null) && (cur.length > 0)) { if ((cur != null) && (cur.length > 0)) {
@ -86,6 +86,8 @@ public abstract class ACBuilder extends IncrementalProjectBuilder implements IMa
String locationText = NLS.bind(CCorePlugin.getResourceString("ACBuilder.ProblemsView.Location"), //$NON-NLS-1$ String locationText = NLS.bind(CCorePlugin.getResourceString("ACBuilder.ProblemsView.Location"), //$NON-NLS-1$
problemMarkerInfo.lineNumber, externalLocation); problemMarkerInfo.lineNumber, externalLocation);
marker.setAttribute(IMarker.LOCATION, locationText); marker.setAttribute(IMarker.LOCATION, locationText);
} else if (problemMarkerInfo.lineNumber==0){
marker.setAttribute(IMarker.LOCATION, " "); //$NON-NLS-1$
} }
} }
catch (CoreException e) { catch (CoreException e) {