From: Sergey Simonchik Date: Mon, 14 Mar 2016 11:14:45 +0000 (+0300) Subject: revert "show "Current File" scope always (WEB-20644)" (following IDEA-CR-9242) X-Git-Tag: appcode/146.579~8 X-Git-Url: https://git.jetbrains.org/?p=idea%2Fcommunity.git;a=commitdiff_plain;h=a5c7f891d6896ae1d0b917bfd83a1bfc5e461b6d revert "show "Current File" scope always (WEB-20644)" (following IDEA-CR-9242) --- 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) {