From 11dcc20cc4951457cae14f032f634d9c9e5199af Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Thu, 26 Jun 2014 01:41:22 +0200 Subject: [PATCH] Readded additional lookups for search term before searching for references in CSharpSymbolSearch. --- .../Project/Src/Parser/CSharpSymbolSearch.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/CSharpSymbolSearch.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/CSharpSymbolSearch.cs index 435d0a8747..2e38fa7dc6 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/CSharpSymbolSearch.cs +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/CSharpSymbolSearch.cs @@ -133,11 +133,11 @@ namespace CSharpBinding ITextSource textSource = args.ParseableFileContentFinder.Create(fileName); if (textSource == null) return; - // TODO Reactivate somehow! -// if (searchScope.SearchTerm != null) { -// if (textSource.IndexOf(searchScope.SearchTerm, 0, textSource.TextLength, StringComparison.Ordinal) < 0) -// return; -// } + if (searchScopeList != null) { + if (!searchScopeList.Any( + scope => (scope.SearchTerm == null) || (textSource.IndexOf(scope.SearchTerm, 0, textSource.TextLength, StringComparison.Ordinal) >= 0))) + return; + } var parseInfo = SD.ParserService.Parse(fileName, textSource) as CSharpFullParseInformation; if (parseInfo == null) @@ -218,11 +218,11 @@ namespace CSharpBinding ITextSource textSource = args.ParseableFileContentFinder.Create(fileName); if (textSource == null) return; - // TODO Reactivate somehow! -// if (searchScope.SearchTerm != null) { -// if (textSource.IndexOf(searchScope.SearchTerm, 0, textSource.TextLength, StringComparison.Ordinal) < 0) -// return; -// } + if (searchScopeList != null) { + if (!searchScopeList.Any( + scope => (scope.SearchTerm == null) || (textSource.IndexOf(scope.SearchTerm, 0, textSource.TextLength, StringComparison.Ordinal) >= 0))) + return; + } var parseInfo = SD.ParserService.Parse(fileName, textSource) as CSharpFullParseInformation; if (parseInfo == null)