| 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) {
|
|
|