| 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;
|
| + }
|
| +}
|
|
|