Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2012-04-30 01:43:37 -0400
committerSergey Prigogin2012-04-30 01:43:37 -0400
commit821918824e1be1fdc1f3f9c2923c616a531df755 (patch)
treea1b613a18ccc1f5558fc4289edb98955997b9726 /codan/org.eclipse.cdt.codan.ui
parentfd677bb18f8c548f4b4390161b2aee4fed323196 (diff)
downloadorg.eclipse.cdt-821918824e1be1fdc1f3f9c2923c616a531df755.tar.gz
org.eclipse.cdt-821918824e1be1fdc1f3f9c2923c616a531df755.tar.xz
org.eclipse.cdt-821918824e1be1fdc1f3f9c2923c616a531df755.zip
Bug 378023 - Error markers are not removed when a checker is disabled
Diffstat (limited to 'codan/org.eclipse.cdt.codan.ui')
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
index 60f6ddfeb1..062a395ba4 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
@@ -19,10 +19,12 @@ import org.eclipse.cdt.codan.core.CodanRuntime;
import org.eclipse.cdt.codan.core.model.ICheckersRegistry;
import org.eclipse.cdt.codan.core.model.IProblem;
import org.eclipse.cdt.codan.core.model.IProblemProfile;
+import org.eclipse.cdt.codan.internal.core.CodanRunner;
import org.eclipse.cdt.codan.internal.ui.CodanUIActivator;
import org.eclipse.cdt.codan.internal.ui.CodanUIMessages;
import org.eclipse.cdt.codan.internal.ui.dialogs.CustomizeProblemDialog;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.layout.GridDataFactory;
@@ -154,8 +156,16 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements IWork
@Override
public boolean performOk() {
saveWidgetValues();
- getRegistry().updateProfile((IResource) getElement(), null);
- return super.performOk();
+ IResource resource = (IResource) getElement();
+ getRegistry().updateProfile(resource, null);
+ boolean success = super.performOk();
+ if (success) {
+ if (resource == null) {
+ resource = ResourcesPlugin.getWorkspace().getRoot();
+ }
+ CodanRunner.asynchronouslyRemoveMarkersForDisabledProblems(resource);
+ }
+ return success;
}
private void saveWidgetValues() {

Back to the top