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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/base/DartStringStatusContext.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/refactoring/base/DartStringStatusContext.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/base/DartStringStatusContext.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/base/DartStringStatusContext.java
new file mode 100644
index 0000000000000000000000000000000000000000..f1d98e1b17e72452b766e85f0651e07f4d1f315b
--- /dev/null
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/base/DartStringStatusContext.java
@@ -0,0 +1,41 @@
+package com.google.dart.tools.internal.corext.refactoring.base;
+
+import com.google.dart.tools.core.model.SourceRange;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.ltk.core.refactoring.RefactoringStatusContext;
+
+/**
+ * A Dart string context can be used to annotate a </code>RefactoringStatusEntry<code>
+ * with detailed information about an error detected in Dart source code represented
+ * by a string.
+ */
+public class DartStringStatusContext extends RefactoringStatusContext {
+
+ private final String fSource;
+ private final SourceRange fSourceRange;
+
+ /**
+ * @param source the source code containing the error
+ * @param range a source range inside <code>source</code> or <code>null</code> if no special
+ * source range is known.
+ */
+ public DartStringStatusContext(String source, SourceRange range) {
+ Assert.isNotNull(source);
+ fSource = source;
+ fSourceRange = range;
+ }
+
+ @Override
+ public Object getCorrespondingElement() {
+ return null;
+ }
+
+ public String getSource() {
+ return fSource;
+ }
+
+ public SourceRange getSourceRange() {
+ return fSourceRange;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698