show "Current File" scope always (WEB-20644)

This commit is contained in:
Sergey Simonchik
2016-03-12 23:15:58 +03:00
parent 22b837be69
commit d02a8d0c1b
@@ -101,10 +101,12 @@ 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) {