From 59f4d3a7638b42eec4789dcdf86ad03073651f1d Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Tue, 26 May 2009 19:17:26 +0400 Subject: [PATCH] forbid to add All scope (IDEADEV-36983) --- .../com/intellij/profile/codeInspection/ui/actions/AddScopeAction.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lang-impl/src/com/intellij/profile/codeInspection/ui/actions/AddScopeAction.java b/lang-impl/src/com/intellij/profile/codeInspection/ui/actions/AddScopeAction.java index f8c6bd8718..6b338c27f5 100644 --- a/lang-impl/src/com/intellij/profile/codeInspection/ui/actions/AddScopeAction.java +++ b/lang-impl/src/com/intellij/profile/codeInspection/ui/actions/AddScopeAction.java @@ -13,6 +13,7 @@ import com.intellij.openapi.actionSystem.*; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.Messages; +import com.intellij.packageDependencies.DefaultScopesProvider; import com.intellij.profile.codeInspection.ui.InspectionConfigTreeNode; import com.intellij.psi.search.scope.packageSet.NamedScope; import com.intellij.psi.search.scope.packageSet.NamedScopesHolder; @@ -84,6 +85,7 @@ public abstract class AddScopeAction extends AnAction { for (NamedScopesHolder holder : NamedScopesHolder.getAllNamedScopeHolders(project)) { Collections.addAll(scopes, holder.getScopes()); } + scopes.remove(DefaultScopesProvider.getAllScope()); final Set used = new HashSet(); final List nonDefaultTools = getSelectedProfile().getNonDefaultTools(descriptor.getKey().toString()); if (nonDefaultTools != null) { -- 2.11.4.GIT