Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(699)

Unified Diff: pkg/analysis_server/lib/src/services/search/search_engine_internal.dart

Issue 2203173002: Use unitMember/classMember/parameter names instead of offsets in index. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/services/index/index.dart ('k') | pkg/analyzer/lib/src/summary/format.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « pkg/analysis_server/lib/src/services/index/index.dart ('k') | pkg/analyzer/lib/src/summary/format.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698