Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Kubitz2021-10-26 09:27:47 +0000
committerMickael Istria2021-10-27 16:42:44 +0000
commit10ff42bf19dcc3865289d09dccc950440d6590c2 (patch)
tree19cf7539c2513df4e81f38e4d2b2d0970e864541
parenta9c800075d8e561f64a07ab3f3f55afdd1b8d733 (diff)
downloadeclipse.platform.text-10ff42bf19dcc3865289d09dccc950440d6590c2.tar.gz
eclipse.platform.text-10ff42bf19dcc3865289d09dccc950440d6590c2.tar.xz
eclipse.platform.text-10ff42bf19dcc3865289d09dccc950440d6590c2.zip
File Search in git Repositories view is always empty Change-Id: I305ea17dba63c6b4c78385b13588ec8a8232e4ae Signed-off-by: Joerg Kubitz <jkubitz-eclipse@gmx.de> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/186963 Tested-by: Platform Bot <platform-bot@eclipse.org> Reviewed-by: Mickael Istria <mistria@redhat.com>
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/ScopePart.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/ScopePart.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/ScopePart.java
index f07113fc3bf..e87aa34def1 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/ScopePart.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/ScopePart.java
@@ -434,7 +434,9 @@ public class ScopePart {
private boolean canSearchInSelection() {
ISelection selection= fSearchDialog.getSelection();
- return (selection instanceof IStructuredSelection) && !selection.isEmpty() || fActiveEditorCanProvideScopeSelection && fSearchDialog.getActiveEditorInput() != null;
+ return (selection instanceof IStructuredSelection) && !selection.isEmpty()
+ && !selectedResourcesFromContainer(fSearchDialog).isEmpty()
+ || fActiveEditorCanProvideScopeSelection && fSearchDialog.getActiveEditorInput() != null;
}

Back to the top