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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/general/SourceRangeFactory.java

Issue 11577022: Issue 7093. Support for inlining function references. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/general/SourceRangeFactory.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/general/SourceRangeFactory.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/general/SourceRangeFactory.java
index ce64b429cf24ec3f90606d4b11e745ebf0f39ac4..973eafbab9a24be4ff33333dbf9e7b0f4c513eb3 100644
--- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/general/SourceRangeFactory.java
+++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/general/SourceRangeFactory.java
@@ -147,6 +147,15 @@ public class SourceRangeFactory {
}
/**
+ * @return the {@link SourceRange} which start at start of "a" and ends at end of "b".
+ */
+ public static SourceRange forStartEnd(SourceRange a, HasSourceInfo b) {
+ int start = a.getOffset();
+ int end = b.getSourceInfo().getEnd();
+ return new SourceRangeImpl(start, end - start);
+ }
+
+ /**
* @return the {@link SourceRange} which start at start of "a" and ends at "end".
*/
public static SourceRange forStartEnd(SourceRange a, int end) {

Powered by Google App Engine
This is Rietveld 408576698