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

Unified Diff: pkg/analysis_server/lib/src/services/refactoring/rename_constructor.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
Index: pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart
index 460896e949c3ebb950528d098458106444c76eca..23e03426174678ad57c5eb1436b720407c2394d8 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart
@@ -86,7 +86,13 @@ class RenameConstructorRefactoringImpl extends RenameRefactoringImpl {
} else {
sourceRange = rangeStartLength(element.nameEnd, 0);
}
- String file = element.source.fullName;
- return new SourceReference(file, sourceRange, element, true, true);
+ return new SourceReference(new SearchMatch(
+ element.context,
+ element.library.source.uri.toString(),
+ element.source.uri.toString(),
+ MatchKind.DECLARATION,
+ sourceRange,
+ true,
+ true));
}
}

Powered by Google App Engine
This is Rietveld 408576698