Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorAnton Leherbauer2008-11-11 13:43:23 +0000
committerAnton Leherbauer2008-11-11 13:43:23 +0000
commit172288ff755f4a053dec857722453f2b55a0123c (patch)
tree1a69ee221800431c9cc5e5fe6a09529c117d6f9c /build
parentedeb6f1af14fa0a5eaba55bc0c0ca84be90c8f7d (diff)
downloadorg.eclipse.cdt-172288ff755f4a053dec857722453f2b55a0123c.tar.gz
org.eclipse.cdt-172288ff755f4a053dec857722453f2b55a0123c.tar.xz
org.eclipse.cdt-172288ff755f4a053dec857722453f2b55a0123c.zip
Bug 254849 - [Problems View] Sort by location sorts lexicographically
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java
index 368db77f39b..0f52988d3c3 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -67,7 +67,6 @@ public class SCMarkerGenerator implements IMarkerGenerator {
}
IMarker marker = problemMarkerInfo.file.createMarker(ICModelMarker.C_MODEL_PROBLEM_MARKER);
- marker.setAttribute(IMarker.LOCATION, String.valueOf(problemMarkerInfo.lineNumber));
marker.setAttribute(IMarker.MESSAGE, problemMarkerInfo.description);
marker.setAttribute(IMarker.SEVERITY, mapMarkerSeverity(problemMarkerInfo.severity));
marker.setAttribute(IMarker.LINE_NUMBER, problemMarkerInfo.lineNumber);
@@ -92,7 +91,7 @@ public class SCMarkerGenerator implements IMarkerGenerator {
try {
IMarker[] markers = file.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, false, IResource.DEPTH_ONE);
if (markers != null) {
- List exactMarkers = new ArrayList();
+ List<IMarker> exactMarkers = new ArrayList<IMarker>();
for (int i = 0; i < markers.length; i++) {
IMarker marker = markers[i];
int location = ((Integer) marker.getAttribute(IMarker.LINE_NUMBER)).intValue();
@@ -105,7 +104,7 @@ public class SCMarkerGenerator implements IMarkerGenerator {
}
}
if (exactMarkers.size() > 0) {
- workspace.deleteMarkers((IMarker[]) exactMarkers.toArray(new IMarker[exactMarkers.size()]));
+ workspace.deleteMarkers(exactMarkers.toArray(new IMarker[exactMarkers.size()]));
}
}
}

Back to the top