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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/SourceRangeFactory.java

Issue 10916211: Issue 4752. When convert to getter, remove also () (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use setter in *Info Created 8 years, 3 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: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/SourceRangeFactory.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/SourceRangeFactory.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/SourceRangeFactory.java
index 0327db2b06ef3dd205341c829e7b625a6f141be0..e82fc30eeede80a562ad04f9ba2b75a5c5e230ec 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/SourceRangeFactory.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/SourceRangeFactory.java
@@ -17,6 +17,7 @@ import com.google.dart.compiler.DartCompilationError;
import com.google.dart.compiler.common.HasSourceInfo;
import com.google.dart.engine.scanner.Token;
import com.google.dart.tools.core.internal.model.SourceRangeImpl;
+import com.google.dart.tools.core.internal.util.SourceRangeUtils;
import com.google.dart.tools.core.model.SourceRange;
import java.util.List;
@@ -62,6 +63,15 @@ public class SourceRangeFactory {
}
/**
+ * @return the {@link SourceRange} which start at end of "a" and ends at end of "b".
+ */
+ public static SourceRange forEndEnd(SourceRange a, SourceRange b) {
+ int start = SourceRangeUtils.getEnd(a);
+ int end = SourceRangeUtils.getEnd(b);
+ return forStartEnd(start, end);
+ }
+
+ /**
* @return the {@link SourceRange} which start at the end of "startInfo" and has specified length.
*/
public static SourceRange forEndLength(HasSourceInfo startInfo, int length) {

Powered by Google App Engine
This is Rietveld 408576698