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

Unified Diff: pkg/analysis_server/lib/src/services/refactoring/rename.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.dart
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename.dart b/pkg/analysis_server/lib/src/services/refactoring/rename.dart
index ec36d008a7ece0f066fb47cc848f61771fe90cf5..b6f54c12b78c879c0e0716c406d717453d3aa6d9 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename.dart
@@ -98,7 +98,7 @@ bool isReferenceInLocalRange(LocalElement localElement, SearchMatch reference) {
return false;
}
Source localSource = localElement.source;
- Source referenceSource = reference.element.source;
+ Source referenceSource = reference.unitSource;
SourceRange localRange = localElement.visibleRange;
SourceRange referenceRange = reference.sourceRange;
return referenceSource == localSource &&

Powered by Google App Engine
This is Rietveld 408576698