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

Unified Diff: pkg/analysis_server/lib/src/services/correction/source_range.dart

Issue 526583002: 'Inline Method' refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments Created 6 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 | « no previous file | pkg/analysis_server/lib/src/services/correction/util.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/correction/source_range.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/source_range.dart b/pkg/analysis_server/lib/src/services/correction/source_range.dart
index 9ed3438ff8d579784cd684c1ea4398f495137f2c..f7117ae7b7a9bfd3bf2e79dbecce8e859e398f05 100644
--- a/pkg/analysis_server/lib/src/services/correction/source_range.dart
+++ b/pkg/analysis_server/lib/src/services/correction/source_range.dart
@@ -36,6 +36,15 @@ SourceRange rangeError(AnalysisError error) {
return new SourceRange(error.offset, error.length);
}
+/**
+ * Returns the [SourceRange] of [r] with offset from the given [base].
+ */
+SourceRange rangeFromBase(SourceRange r, int base) {
+ int start = r.offset - base;
+ int length = r.length;
+ return rangeStartLength(start, length);
+}
+
SourceRange rangeNode(AstNode node) {
return new SourceRange(node.offset, node.length);
}
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/correction/util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698