mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
scopes: keep all scopes if showEmptyScopes=true (in this case, files in a scope at creation time may differ from files in the same scope at usage time)
previously, "Open Files" scope prevented adding "Current File" if both scopes are empty
This commit is contained in:
+1
-2
@@ -29,7 +29,6 @@ import com.intellij.openapi.fileEditor.FileEditorManager;
|
||||
import com.intellij.openapi.module.*;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
@@ -69,7 +68,7 @@ public class PredefinedSearchScopeProviderImpl extends PredefinedSearchScopeProv
|
||||
boolean currentSelection,
|
||||
boolean usageView,
|
||||
boolean showEmptyScopes) {
|
||||
Collection<SearchScope> result = ContainerUtil.newLinkedHashSet();
|
||||
Collection<SearchScope> result = showEmptyScopes ? ContainerUtil.newArrayList() : ContainerUtil.newLinkedHashSet();
|
||||
result.add(GlobalSearchScope.projectScope(project));
|
||||
if (suggestSearchInLibs) {
|
||||
result.add(GlobalSearchScope.allScope(project));
|
||||
|
||||
Reference in New Issue
Block a user