diff options
author | Tor Norbye <tnorbye@google.com> | 2014-08-19 22:27:03 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-08-19 21:25:05 +0000 |
commit | 4ca751c002784c4bfd349cc5240b045b62277c80 (patch) | |
tree | dfc17b31990e2429535609b85f6d080c4fa0d9fe /platform/lang-impl/src/com/intellij/profile/codeInspection/ui/filter/InspectionsFilter.java | |
parent | 890d9a2952301682ffecaed4495f5f65c84c3642 (diff) | |
parent | 060e58b3afea3ea39f5ba1cb5a443ca3ebda28c8 (diff) | |
download | idea-4ca751c002784c4bfd349cc5240b045b62277c80.tar.gz |
Merge "Merge remote-tracking branch 'aosp/upstream-master' into merge"
Diffstat (limited to 'platform/lang-impl/src/com/intellij/profile/codeInspection/ui/filter/InspectionsFilter.java')
-rw-r--r-- | platform/lang-impl/src/com/intellij/profile/codeInspection/ui/filter/InspectionsFilter.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/filter/InspectionsFilter.java b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/filter/InspectionsFilter.java index 432ef560ba58..117cd774dff8 100644 --- a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/filter/InspectionsFilter.java +++ b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/filter/InspectionsFilter.java @@ -33,11 +33,16 @@ public abstract class InspectionsFilter { private final Set<HighlightSeverity> mySuitableSeverities = new HashSet<HighlightSeverity>(); private Boolean mySuitableInspectionsStates; private boolean myAvailableOnlyForAnalyze; + private boolean myShowOnlyCleanupInspections; public boolean isAvailableOnlyForAnalyze() { return myAvailableOnlyForAnalyze; } + public boolean isShowOnlyCleanupInspections() { + return myShowOnlyCleanupInspections; + } + public Boolean getSuitableInspectionsStates() { return mySuitableInspectionsStates; } @@ -46,6 +51,11 @@ public abstract class InspectionsFilter { return mySuitableSeverities.contains(severity); } + public void setShowOnlyCleanupInspections(final boolean showOnlyCleanupInspections) { + myShowOnlyCleanupInspections = showOnlyCleanupInspections; + filterChanged(); + } + public void setAvailableOnlyForAnalyze(final boolean availableOnlyForAnalyze) { myAvailableOnlyForAnalyze = availableOnlyForAnalyze; filterChanged(); @@ -67,10 +77,17 @@ public abstract class InspectionsFilter { } public boolean isEmptyFilter() { - return mySuitableInspectionsStates == null && !myAvailableOnlyForAnalyze && mySuitableSeverities.isEmpty(); + return mySuitableInspectionsStates == null + && !myAvailableOnlyForAnalyze + && !myShowOnlyCleanupInspections + && mySuitableSeverities.isEmpty(); } public boolean matches(final Tools tools) { + if (myShowOnlyCleanupInspections && !tools.getTool().isCleanupTool()) { + return false; + } + if (mySuitableInspectionsStates != null && mySuitableInspectionsStates != tools.isEnabled()) { return false; } |