From 08367e21b0830e2d752c39760ead8c79648bff0a Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Thu, 4 Aug 2005 13:50:51 +0000 Subject: [PATCH] Patch for Devin: Fix for 105220 and friends. --- .../src/org/eclipse/cdt/internal/ui/search/DOMQuery.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/DOMQuery.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/DOMQuery.java index 40add7141cb..77c1597f8be 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/DOMQuery.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/DOMQuery.java @@ -143,7 +143,8 @@ public class DOMQuery extends CSearchQuery implements ISearchQuery { } } - if ((searchPattern != null || matches == null || matches.size() == 0) && (foundNames == null || foundNames.length == 0)) { + // if the searchPattern is not null, and there were no matches from the index, and there were no matches from the DOM AST then do a basic index search with the searchPattern String + if (searchPattern != null && (matches == null || matches.size() == 0) && (foundNames == null || foundNames.length == 0)) { // last try: search the index for the selected string, even if no name was found for that selection matches = DOMSearchUtil.getMatchesFromSearchEngine( scope, searchPattern, limitTo );