Index: pkg/analysis_server/lib/src/services/search/search_engine_internal.dart |
diff --git a/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart b/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart |
index 47eb392eae2a489fb8e309e2b2064bc4e423afe6..5b2b6e3f6c680a1b9c0268e688015428b1254476 100644 |
--- a/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart |
+++ b/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart |
@@ -261,12 +261,10 @@ class SearchEngineImpl implements SearchEngine { |
ParameterElement parameter) async { |
List<SearchMatch> matches = <SearchMatch>[]; |
matches.addAll(await _searchReferences(parameter)); |
- matches.addAll(await _searchReferences_Local( |
- parameter, |
- (n) => |
- n is ConstructorDeclaration || |
- n is MethodDeclaration || |
- n is FunctionExpression)); |
+ matches.addAll(await _searchReferences_Local(parameter, (AstNode node) { |
+ AstNode parent = node.parent; |
+ return parent is ClassDeclaration || parent is CompilationUnit; |
+ })); |
return matches; |
} |
@@ -408,7 +406,7 @@ class _LocalReferencesVisitor extends RecursiveAstVisitor { |
} |
void _addMatch(AstNode node, MatchKind kind) { |
- bool isQualified = node is SimpleIdentifier && node.isQualified; |
+ bool isQualified = node.parent is Label; |
matches.add(new SearchMatch(context, libraryUri, unitUri, kind, |
rangeNode(node), true, isQualified)); |
} |