Chromium Code Reviews| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AddContentOverlay.java |
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AddContentOverlay.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AddContentOverlay.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..29c63b777041214014ac6def7dfd78f23f39aae6 |
| --- /dev/null |
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AddContentOverlay.java |
| @@ -0,0 +1,90 @@ |
| +/* |
| + * Copyright (c) 2014, the Dart project authors. |
| + * |
| + * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except |
| + * in compliance with the License. You may obtain a copy of the License at |
| + * |
| + * http://www.eclipse.org/legal/epl-v10.html |
| + * |
| + * Unless required by applicable law or agreed to in writing, software distributed under the License |
| + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
| + * or implied. See the License for the specific language governing permissions and limitations under |
| + * the License. |
| + * |
| + * This file has been automatically generated. Please do not edit it manually. |
| + * To regenerate the file, use the script "pkg/analysis_server/spec/generate_files". |
| + */ |
| +package com.google.dart.server.generated.types; |
| + |
| +import java.util.Arrays; |
| +import java.util.List; |
| +import java.util.Map; |
| +import com.google.dart.server.utilities.general.ObjectUtilities; |
| +import org.apache.commons.lang3.StringUtils; |
| + |
| +/** |
| + * A directive to begin overlaying the contents of a file. The supplied content will be used for |
| + * analysis in place of the file contents in the filesystem. |
| + * |
| + * If this directive is used on a file that already has a file content overlay, the old overlay is |
| + * discarded and replaced with the new one. |
| + * |
| + * @coverage dart.server.generated.types |
| + */ |
| +@SuppressWarnings("unused") |
| +public class AddContentOverlay { |
| + |
| + /** |
| + * The new content of the file. |
| + */ |
| + private final String content; |
| + |
| + /** |
| + */ |
| + private final String type; |
|
Paul Berry
2014/08/13 21:39:06
The only purpose of this field is to allow the rec
jwren
2014/08/13 22:29:15
Acknowledged.
|
| + |
| + /** |
| + * Constructor for {@link AddContentOverlay}. |
| + */ |
| + public AddContentOverlay(String type, String content) { |
| + this.type = type; |
|
Paul Berry
2014/08/13 21:39:06
(Assuming that we don't get rid of this field) Sin
jwren
2014/08/13 22:29:15
Acknowledged.
|
| + this.content = content; |
| + } |
| + |
| + @Override |
| + public boolean equals(Object obj) { |
| + if (obj instanceof AddContentOverlay) { |
| + AddContentOverlay other = (AddContentOverlay) obj; |
| + return |
| + ObjectUtilities.equals(other.type, type) && |
| + ObjectUtilities.equals(other.content, content); |
| + } |
| + return false; |
| + } |
| + |
| + /** |
| + * The new content of the file. |
| + */ |
| + public String getContent() { |
| + return content; |
| + } |
| + |
| + /** |
| + */ |
| + public String getType() { |
| + return type; |
| + } |
| + |
| + @Override |
| + public String toString() { |
|
Paul Berry
2014/08/13 21:39:06
It wouldn't take much to get this method to output
jwren
2014/08/13 22:29:15
Acknowledged. Yes. The toString is used only as
|
| + StringBuilder builder = new StringBuilder(); |
| + builder.append("["); |
| + builder.append("type="); |
| + builder.append(type.toString() + ", "); |
| + builder.append("content="); |
| + builder.append(content.toString() + ", "); |
|
scheglov
2014/08/13 22:05:58
We probably don't want to call toString() for Stri
jwren
2014/08/13 22:34:27
Will add a TODO... I thought of this, but it is s
|
| + builder.append("]"); |
| + return builder.toString(); |
| + } |
| + |
| +} |