| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/AnalysisErrorImpl.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/local/computer/SearchResultImpl.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/AnalysisErrorImpl.java
|
| similarity index 50%
|
| copy from editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/local/computer/SearchResultImpl.java
|
| copy to editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/AnalysisErrorImpl.java
|
| index da0b6eb5db8373647c9400c08bf384ab52ce8b92..d917f3682e1f0416ccd7922c273183dbcd3fa6f0 100644
|
| --- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/local/computer/SearchResultImpl.java
|
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/AnalysisErrorImpl.java
|
| @@ -12,81 +12,79 @@
|
| * the License.
|
| */
|
|
|
| -package com.google.dart.server.internal.local.computer;
|
| +package com.google.dart.server.internal.remote.processor;
|
|
|
| -import com.google.dart.engine.source.Source;
|
| -import com.google.dart.server.Element;
|
| -import com.google.dart.server.SearchResult;
|
| -import com.google.dart.server.SearchResultKind;
|
| +import com.google.dart.engine.error.ErrorCode;
|
| +import com.google.dart.server.AnalysisError;
|
|
|
| /**
|
| - * A concrete implementation of {@link SearchResult}.
|
| + * An implementation of {@link AnalysisError}.
|
| *
|
| - * @coverage dart.server.local
|
| + * @coverage dart.server.remote
|
| */
|
| -public class SearchResultImpl implements SearchResult {
|
| - private final Element[] path;
|
| - private final Source source;
|
| - private final SearchResultKind kind;
|
| +public class AnalysisErrorImpl implements AnalysisError {
|
| + private final String file;
|
| + private final ErrorCode errorCode;
|
| private final int offset;
|
| private final int length;
|
| - private final boolean isPotential;
|
| + private final String message;
|
| + private final String correction;
|
|
|
| - public SearchResultImpl(Element[] path, Source source, SearchResultKind kind, int offset,
|
| - int length, boolean isPotential) {
|
| - this.path = path;
|
| - this.source = source;
|
| - this.kind = kind;
|
| + public AnalysisErrorImpl(String file, ErrorCode errorCode, int offset, int length,
|
| + String message, String correction) {
|
| + this.file = file;
|
| + this.errorCode = errorCode;
|
| this.offset = offset;
|
| this.length = length;
|
| - this.isPotential = isPotential;
|
| + this.message = message;
|
| + this.correction = correction;
|
| }
|
|
|
| @Override
|
| - public SearchResultKind getKind() {
|
| - return kind;
|
| + public String getCorrection() {
|
| + return correction;
|
| }
|
|
|
| @Override
|
| - public int getLength() {
|
| - return length;
|
| + public ErrorCode getErrorCode() {
|
| + return errorCode;
|
| }
|
|
|
| @Override
|
| - public int getOffset() {
|
| - return offset;
|
| + public String getFile() {
|
| + return file;
|
| }
|
|
|
| @Override
|
| - public Element[] getPath() {
|
| - return path;
|
| + public int getLength() {
|
| + return length;
|
| }
|
|
|
| @Override
|
| - public Source getSource() {
|
| - return source;
|
| + public String getMessage() {
|
| + return message;
|
| }
|
|
|
| @Override
|
| - public boolean isPotential() {
|
| - return isPotential;
|
| + public int getOffset() {
|
| + return offset;
|
| }
|
|
|
| @Override
|
| public String toString() {
|
| StringBuilder builder = new StringBuilder();
|
| - builder.append("[source=");
|
| - builder.append(source);
|
| - builder.append(", kind=");
|
| - builder.append(kind);
|
| + builder.append("[file=");
|
| + builder.append(file);
|
| + builder.append(", errorCode=");
|
| + builder.append(errorCode);
|
| builder.append(", offset=");
|
| builder.append(offset);
|
| builder.append(", length=");
|
| builder.append(length);
|
| - builder.append(", potential=");
|
| - builder.append(isPotential);
|
| - builder.append(", path=");
|
| - builder.append(path);
|
| + builder.append(", message=");
|
| + builder.append(message);
|
| + builder.append(", correction=");
|
| + builder.append(correction);
|
| builder.append("]");
|
| return builder.toString();
|
| }
|
|
|