| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/InlineMethodOptions.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisStatus.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/InlineMethodOptions.java
|
| similarity index 51%
|
| copy from editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisStatus.java
|
| copy to editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/InlineMethodOptions.java
|
| index 4b30e86920cfedf49f9657cd30d84280e8bc99f1..8a8c46279a23299035c752ce72c539c0deb42446 100644
|
| --- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisStatus.java
|
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/InlineMethodOptions.java
|
| @@ -32,57 +32,57 @@ import java.util.Iterator;
|
| import org.apache.commons.lang3.StringUtils;
|
|
|
| /**
|
| - * An indication of the current state of analysis.
|
| - *
|
| * @coverage dart.server.generated.types
|
| */
|
| @SuppressWarnings("unused")
|
| -public class AnalysisStatus {
|
| +public class InlineMethodOptions extends RefactoringOptions {
|
|
|
| - public static final AnalysisStatus[] EMPTY_ARRAY = new AnalysisStatus[0];
|
| + public static final InlineMethodOptions[] EMPTY_ARRAY = new InlineMethodOptions[0];
|
|
|
| - public static final List<AnalysisStatus> EMPTY_LIST = Lists.newArrayList();
|
| + public static final List<InlineMethodOptions> EMPTY_LIST = Lists.newArrayList();
|
|
|
| /**
|
| - * True if analysis is currently being performed.
|
| + * True if the method being inlined should be removed. It is an error if this field is true and
|
| + * inlineAll is false.
|
| */
|
| - private final Boolean isAnalyzing;
|
| + private final Boolean deleteSource;
|
|
|
| /**
|
| - * The name of the current target of analysis. This field is omitted if analyzing is false.
|
| + * True if all invocations of the method should be inlined, or false if only the invocation site
|
| + * used to create this refactoring should be inlined.
|
| */
|
| - private final String analysisTarget;
|
| + private final Boolean inlineAll;
|
|
|
| /**
|
| - * Constructor for {@link AnalysisStatus}.
|
| + * Constructor for {@link InlineMethodOptions}.
|
| */
|
| - public AnalysisStatus(Boolean isAnalyzing, String analysisTarget) {
|
| - this.isAnalyzing = isAnalyzing;
|
| - this.analysisTarget = analysisTarget;
|
| + public InlineMethodOptions(Boolean deleteSource, Boolean inlineAll) {
|
| + this.deleteSource = deleteSource;
|
| + this.inlineAll = inlineAll;
|
| }
|
|
|
| @Override
|
| public boolean equals(Object obj) {
|
| - if (obj instanceof AnalysisStatus) {
|
| - AnalysisStatus other = (AnalysisStatus) obj;
|
| + if (obj instanceof InlineMethodOptions) {
|
| + InlineMethodOptions other = (InlineMethodOptions) obj;
|
| return
|
| - ObjectUtilities.equals(other.isAnalyzing, isAnalyzing) &&
|
| - ObjectUtilities.equals(other.analysisTarget, analysisTarget);
|
| + ObjectUtilities.equals(other.deleteSource, deleteSource) &&
|
| + ObjectUtilities.equals(other.inlineAll, inlineAll);
|
| }
|
| return false;
|
| }
|
|
|
| - public static AnalysisStatus fromJson(JsonObject jsonObject) {
|
| - Boolean isAnalyzing = jsonObject.get("isAnalyzing").getAsBoolean();
|
| - String analysisTarget = jsonObject.get("analysisTarget") == null ? null : jsonObject.get("analysisTarget").getAsString();
|
| - return new AnalysisStatus(isAnalyzing, analysisTarget);
|
| + public static InlineMethodOptions fromJson(JsonObject jsonObject) {
|
| + Boolean deleteSource = jsonObject.get("deleteSource").getAsBoolean();
|
| + Boolean inlineAll = jsonObject.get("inlineAll").getAsBoolean();
|
| + return new InlineMethodOptions(deleteSource, inlineAll);
|
| }
|
|
|
| - public static List<AnalysisStatus> fromJsonArray(JsonArray jsonArray) {
|
| + public static List<InlineMethodOptions> fromJsonArray(JsonArray jsonArray) {
|
| if (jsonArray == null) {
|
| return EMPTY_LIST;
|
| }
|
| - ArrayList<AnalysisStatus> list = new ArrayList<AnalysisStatus>(jsonArray.size());
|
| + ArrayList<InlineMethodOptions> list = new ArrayList<InlineMethodOptions>(jsonArray.size());
|
| Iterator<JsonElement> iterator = jsonArray.iterator();
|
| while (iterator.hasNext()) {
|
| list.add(fromJson(iterator.next().getAsJsonObject()));
|
| @@ -91,33 +91,33 @@ public class AnalysisStatus {
|
| }
|
|
|
| /**
|
| - * The name of the current target of analysis. This field is omitted if analyzing is false.
|
| + * True if the method being inlined should be removed. It is an error if this field is true and
|
| + * inlineAll is false.
|
| */
|
| - public String getAnalysisTarget() {
|
| - return analysisTarget;
|
| + public Boolean deleteSource() {
|
| + return deleteSource;
|
| }
|
|
|
| /**
|
| - * True if analysis is currently being performed.
|
| + * True if all invocations of the method should be inlined, or false if only the invocation site
|
| + * used to create this refactoring should be inlined.
|
| */
|
| - public Boolean isAnalyzing() {
|
| - return isAnalyzing;
|
| + public Boolean inlineAll() {
|
| + return inlineAll;
|
| }
|
|
|
| @Override
|
| public int hashCode() {
|
| HashCodeBuilder builder = new HashCodeBuilder();
|
| - builder.append(isAnalyzing);
|
| - builder.append(analysisTarget);
|
| + builder.append(deleteSource);
|
| + builder.append(inlineAll);
|
| return builder.toHashCode();
|
| }
|
|
|
| public JsonObject toJson() {
|
| JsonObject jsonObject = new JsonObject();
|
| - jsonObject.addProperty("isAnalyzing", isAnalyzing);
|
| - if (analysisTarget != null) {
|
| - jsonObject.addProperty("analysisTarget", analysisTarget);
|
| - }
|
| + jsonObject.addProperty("deleteSource", deleteSource);
|
| + jsonObject.addProperty("inlineAll", inlineAll);
|
| return jsonObject;
|
| }
|
|
|
| @@ -125,10 +125,10 @@ public class AnalysisStatus {
|
| public String toString() {
|
| StringBuilder builder = new StringBuilder();
|
| builder.append("[");
|
| - builder.append("isAnalyzing=");
|
| - builder.append(isAnalyzing + ", ");
|
| - builder.append("analysisTarget=");
|
| - builder.append(analysisTarget);
|
| + builder.append("deleteSource=");
|
| + builder.append(deleteSource + ", ");
|
| + builder.append("inlineAll=");
|
| + builder.append(inlineAll);
|
| builder.append("]");
|
| return builder.toString();
|
| }
|
|
|