mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-30 21:55:31 +02:00
Bug 340092 - Codan does not update severity in markers when a problem's severity has been changed in Preferences. Patch by Alex Ruiz.
This commit is contained in:
parent
0a500299af
commit
25bed5bd57
1 changed files with 9 additions and 6 deletions
|
@ -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)
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue