@@ -133,11 +133,11 @@ void FindReferencesInFile(SymbolSearchArgs args, IList<IFindReferenceSearchScope
133133 ITextSource textSource = args . ParseableFileContentFinder . Create ( fileName ) ;
134134 if ( textSource == null )
135135 return ;
136- // TODO Reactivate somehow!
137- // if (searchScope.SearchTerm != null) {
138- // if ( textSource.IndexOf(searchScope .SearchTerm, 0, textSource.TextLength, StringComparison.Ordinal) < 0 )
139- // return;
140- // }
136+ if ( searchScopeList != null ) {
137+ if ( ! searchScopeList . Any (
138+ scope => ( scope . SearchTerm == null ) || ( textSource . IndexOf ( scope . SearchTerm , 0 , textSource . TextLength , StringComparison . Ordinal ) >= 0 ) ) )
139+ return ;
140+ }
141141
142142 var parseInfo = SD . ParserService . Parse ( fileName , textSource ) as CSharpFullParseInformation ;
143143 if ( parseInfo == null )
@@ -218,11 +218,11 @@ void RenameReferencesInFile(SymbolRenameArgs args, IList<IFindReferenceSearchSco
218218 ITextSource textSource = args . ParseableFileContentFinder . Create ( fileName ) ;
219219 if ( textSource == null )
220220 return ;
221- // TODO Reactivate somehow!
222- // if (searchScope.SearchTerm != null) {
223- // if ( textSource.IndexOf(searchScope .SearchTerm, 0, textSource.TextLength, StringComparison.Ordinal) < 0 )
224- // return;
225- // }
221+ if ( searchScopeList != null ) {
222+ if ( ! searchScopeList . Any (
223+ scope => ( scope . SearchTerm == null ) || ( textSource . IndexOf ( scope . SearchTerm , 0 , textSource . TextLength , StringComparison . Ordinal ) >= 0 ) ) )
224+ return ;
225+ }
226226
227227 var parseInfo = SD . ParserService . Parse ( fileName , textSource ) as CSharpFullParseInformation ;
228228 if ( parseInfo == null )
0 commit comments