Skip to main content
summaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorSergey Prigogin2011-03-22 23:02:03 -0400
committerSergey Prigogin2011-03-22 23:02:03 -0400
commit25bed5bd57483fb67eae0c1d6f366c7e83ebe4a7 (patch)
tree5680835f6f6c3377528e58069a6ec8944883f497 /codan
parent0a500299af35323ad7adf917db3204e941a87749 (diff)
downloadorg.eclipse.cdt-25bed5bd57483fb67eae0c1d6f366c7e83ebe4a7.tar.gz
org.eclipse.cdt-25bed5bd57483fb67eae0c1d6f366c7e83ebe4a7.tar.xz
org.eclipse.cdt-25bed5bd57483fb67eae0c1d6f366c7e83ebe4a7.zip
Bug 340092 - Codan does not update severity in markers when a problem's severity has been changed in Preferences. Patch by Alex Ruiz.
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanMarkerProblemReporter.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanMarkerProblemReporter.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanMarkerProblemReporter.java
index 1747a0a4cd..fa2f112797 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanMarkerProblemReporter.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanMarkerProblemReporter.java
@@ -10,11 +10,6 @@
*******************************************************************************/
package org.eclipse.cdt.codan.internal.core.model;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-
import org.eclipse.cdt.codan.core.CodanCorePlugin;
import org.eclipse.cdt.codan.core.CodanRuntime;
import org.eclipse.cdt.codan.core.model.AbstractProblemReporter;
@@ -33,6 +28,11 @@ import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+
/**
* Problem reported that created eclipse markers
*/
@@ -211,6 +211,9 @@ public class CodanMarkerProblemReporter extends AbstractProblemReporter implemen
m.setAttribute(IMarker.CHAR_START, loc.getStartingChar());
if (m.getAttribute(IMarker.CHAR_END, 0) != loc.getEndingChar())
m.setAttribute(IMarker.CHAR_END, loc.getEndingChar());
+ int severity = cm.getProblem().getSeverity().intValue();
+ if (m.getAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO) != severity)
+ m.setAttribute(IMarker.SEVERITY, severity);
} catch (CoreException e) {
try {
m.delete();
@@ -262,7 +265,7 @@ public class CodanMarkerProblemReporter extends AbstractProblemReporter implemen
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.cdt.codan.core.model.IProblemReporterSessionPersistent#
* deleteProblems(boolean)
*/

Back to the top