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

Unified Diff: pkg/analysis_server/lib/src/search/element_references.dart

Issue 1764553002: Make SearchMatch usable for the new index - remove the element field. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | pkg/analysis_server/lib/src/services/refactoring/refactoring_internal.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/search/element_references.dart
diff --git a/pkg/analysis_server/lib/src/search/element_references.dart b/pkg/analysis_server/lib/src/search/element_references.dart
index 112db5d6d32f5723ccd34f937853a81306b8a97e..0608764419ffbdbde1663dee9ff048d7fa9b4c9e 100644
--- a/pkg/analysis_server/lib/src/search/element_references.dart
+++ b/pkg/analysis_server/lib/src/search/element_references.dart
@@ -91,8 +91,14 @@ class ElementReferencesComputer {
SearchResult _newDeclarationResult(Element refElement) {
int nameOffset = refElement.nameOffset;
int nameLength = refElement.nameLength;
- SearchMatch searchMatch = new SearchMatch(MatchKind.DECLARATION, refElement,
- new SourceRange(nameOffset, nameLength), true, false);
+ SearchMatch searchMatch = new SearchMatch(
+ refElement.context,
+ refElement.library.source.uri.toString(),
+ refElement.source.uri.toString(),
+ MatchKind.DECLARATION,
+ new SourceRange(nameOffset, nameLength),
+ true,
+ false);
return newSearchResult_fromMatch(searchMatch);
}
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/refactoring/refactoring_internal.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698