From a5c7f891d6896ae1d0b917bfd83a1bfc5e461b6d Mon Sep 17 00:00:00 2001 From: Sergey Simonchik Date: Mon, 14 Mar 2016 14:14:45 +0300 Subject: [PATCH] revert "show "Current File" scope always (WEB-20644)" (following IDEA-CR-9242) --- .../psi/search/PredefinedSearchScopeProviderImpl.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/psi/search/PredefinedSearchScopeProviderImpl.java b/platform/lang-impl/src/com/intellij/psi/search/PredefinedSearchScopeProviderImpl.java index c8282195e3be..9f32bbc32655 100644 --- a/platform/lang-impl/src/com/intellij/psi/search/PredefinedSearchScopeProviderImpl.java +++ b/platform/lang-impl/src/com/intellij/psi/search/PredefinedSearchScopeProviderImpl.java @@ -101,12 +101,10 @@ public class PredefinedSearchScopeProviderImpl extends PredefinedSearchScopeProv result.add(module.getModuleScope()); } } + if (dataContextElement.getContainingFile() != null) { + result.add(new LocalSearchScope(dataContextElement, IdeBundle.message("scope.current.file"))); + } } - PsiElement[] currentFileScope = PsiElement.EMPTY_ARRAY; - if (dataContextElement != null && dataContextElement.getContainingFile() != null) { - currentFileScope = new PsiElement[]{dataContextElement}; - } - result.add(new LocalSearchScope(currentFileScope, IdeBundle.message("scope.current.file"))); } if (currentSelection) { -- 2.23.3