diff options
author | Joerg Kubitz | 2021-10-26 09:27:47 +0000 |
---|---|---|
committer | Mickael Istria | 2021-10-27 16:42:44 +0000 |
commit | 10ff42bf19dcc3865289d09dccc950440d6590c2 (patch) | |
tree | 19cf7539c2513df4e81f38e4d2b2d0970e864541 | |
parent | a9c800075d8e561f64a07ab3f3f55afdd1b8d733 (diff) | |
download | eclipse.platform.text-10ff42bf19dcc3865289d09dccc950440d6590c2.tar.gz eclipse.platform.text-10ff42bf19dcc3865289d09dccc950440d6590c2.tar.xz eclipse.platform.text-10ff42bf19dcc3865289d09dccc950440d6590c2.zip |
Bug 576837 - Disable search if selection does not contain resourceI20211107-1800I20211107-0600I20211106-1800I20211106-0600I20211105-1800I20211104-1800I20211103-1800I20211103-0020I20211102-1800I20211102-1020I20211101-1800I20211031-1800I20211030-1800I20211029-1800I20211028-1800I20211027-1800
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.java | 4 |
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; } |