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

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

Issue 9834028: Initial implementation of "Rename Local Variable" refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: LInked/inline mode for rename Created 8 years, 9 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
new file mode 100644
index 0000000000000000000000000000000000000000..009157e004cd65d482bc4a5c8c1e35c300ded45a
--- /dev/null
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/SourceRangeFactory.java
@@ -0,0 +1,18 @@
+package com.google.dart.tools.internal.corext;
+
+import com.google.dart.compiler.DartCompilationError;
+import com.google.dart.compiler.ast.DartNode;
+import com.google.dart.tools.core.internal.model.SourceRangeImpl;
+import com.google.dart.tools.core.model.SourceRange;
+
+public class SourceRangeFactory {
+
+ public static SourceRange create(DartCompilationError error) {
+ return new SourceRangeImpl(error.getStartPosition(), error.getLength());
+ }
+
+ public static SourceRange create(DartNode node) {
+ return new SourceRangeImpl(node);
+ }
+
+}

Powered by Google App Engine
This is Rietveld 408576698