| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/MoveFileOptions.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/RenameOptions.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/MoveFileOptions.java
|
| similarity index 63%
|
| copy from editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/RenameOptions.java
|
| copy to editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/MoveFileOptions.java
|
| index e17d49e1cb857704ce549801ef1a7cce44c873b2..a24c3eb18334b718a817d61e6fe3004fcff047d8 100644
|
| --- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/RenameOptions.java
|
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/MoveFileOptions.java
|
| @@ -35,44 +35,44 @@ import org.apache.commons.lang3.StringUtils;
|
| * @coverage dart.server.generated.types
|
| */
|
| @SuppressWarnings("unused")
|
| -public class RenameOptions extends RefactoringOptions {
|
| +public class MoveFileOptions extends RefactoringOptions {
|
|
|
| - public static final RenameOptions[] EMPTY_ARRAY = new RenameOptions[0];
|
| + public static final MoveFileOptions[] EMPTY_ARRAY = new MoveFileOptions[0];
|
|
|
| - public static final List<RenameOptions> EMPTY_LIST = Lists.newArrayList();
|
| + public static final List<MoveFileOptions> EMPTY_LIST = Lists.newArrayList();
|
|
|
| /**
|
| - * The name that the element should have after the refactoring.
|
| + * The new file path to which the given file is being moved.
|
| */
|
| - private String newName;
|
| + private String newFile;
|
|
|
| /**
|
| - * Constructor for {@link RenameOptions}.
|
| + * Constructor for {@link MoveFileOptions}.
|
| */
|
| - public RenameOptions(String newName) {
|
| - this.newName = newName;
|
| + public MoveFileOptions(String newFile) {
|
| + this.newFile = newFile;
|
| }
|
|
|
| @Override
|
| public boolean equals(Object obj) {
|
| - if (obj instanceof RenameOptions) {
|
| - RenameOptions other = (RenameOptions) obj;
|
| + if (obj instanceof MoveFileOptions) {
|
| + MoveFileOptions other = (MoveFileOptions) obj;
|
| return
|
| - ObjectUtilities.equals(other.newName, newName);
|
| + ObjectUtilities.equals(other.newFile, newFile);
|
| }
|
| return false;
|
| }
|
|
|
| - public static RenameOptions fromJson(JsonObject jsonObject) {
|
| - String newName = jsonObject.get("newName").getAsString();
|
| - return new RenameOptions(newName);
|
| + public static MoveFileOptions fromJson(JsonObject jsonObject) {
|
| + String newFile = jsonObject.get("newFile").getAsString();
|
| + return new MoveFileOptions(newFile);
|
| }
|
|
|
| - public static List<RenameOptions> fromJsonArray(JsonArray jsonArray) {
|
| + public static List<MoveFileOptions> fromJsonArray(JsonArray jsonArray) {
|
| if (jsonArray == null) {
|
| return EMPTY_LIST;
|
| }
|
| - ArrayList<RenameOptions> list = new ArrayList<RenameOptions>(jsonArray.size());
|
| + ArrayList<MoveFileOptions> list = new ArrayList<MoveFileOptions>(jsonArray.size());
|
| Iterator<JsonElement> iterator = jsonArray.iterator();
|
| while (iterator.hasNext()) {
|
| list.add(fromJson(iterator.next().getAsJsonObject()));
|
| @@ -81,29 +81,29 @@ public class RenameOptions extends RefactoringOptions {
|
| }
|
|
|
| /**
|
| - * The name that the element should have after the refactoring.
|
| + * The new file path to which the given file is being moved.
|
| */
|
| - public String getNewName() {
|
| - return newName;
|
| + public String getNewFile() {
|
| + return newFile;
|
| }
|
|
|
| @Override
|
| public int hashCode() {
|
| HashCodeBuilder builder = new HashCodeBuilder();
|
| - builder.append(newName);
|
| + builder.append(newFile);
|
| return builder.toHashCode();
|
| }
|
|
|
| /**
|
| - * The name that the element should have after the refactoring.
|
| + * The new file path to which the given file is being moved.
|
| */
|
| - public void setNewName(String newName) {
|
| - this.newName = newName;
|
| + public void setNewFile(String newFile) {
|
| + this.newFile = newFile;
|
| }
|
|
|
| public JsonObject toJson() {
|
| JsonObject jsonObject = new JsonObject();
|
| - jsonObject.addProperty("newName", newName);
|
| + jsonObject.addProperty("newFile", newFile);
|
| return jsonObject;
|
| }
|
|
|
| @@ -111,8 +111,8 @@ public class RenameOptions extends RefactoringOptions {
|
| public String toString() {
|
| StringBuilder builder = new StringBuilder();
|
| builder.append("[");
|
| - builder.append("newName=");
|
| - builder.append(newName);
|
| + builder.append("newFile=");
|
| + builder.append(newFile);
|
| builder.append("]");
|
| return builder.toString();
|
| }
|
|
|