Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Unified Diff: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisOptions.java

Issue 1063613002: Add an analysis server option to enable null-aware-operator support. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Roll the analysis server JSON API version. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisOptions.java
diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisOptions.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisOptions.java
index 89cb524f8f70200a1ea668e5d654eb63ad7d5aae..9ec191d77a15d8aa40d9eaa970fbd94f16ece275 100644
--- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisOptions.java
+++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisOptions.java
@@ -45,27 +45,32 @@ public class AnalysisOptions {
public static final List<AnalysisOptions> EMPTY_LIST = Lists.newArrayList();
/**
- * Deprecated/
+ * Deprecated
*
* True if the client wants to enable support for the proposed async feature.
*/
private final Boolean enableAsync;
/**
- * Deprecated/
+ * Deprecated
*
* True if the client wants to enable support for the proposed deferred loading feature.
*/
private final Boolean enableDeferredLoading;
/**
- * Deprecated/
+ * Deprecated
*
* True if the client wants to enable support for the proposed enum feature.
*/
private final Boolean enableEnums;
/**
+ * True if the client wants to enable support for the proposed "null aware operators" feature.
+ */
+ private final Boolean enableNullAwareOperators;
+
+ /**
* True if hints that are specific to dart2js should be generated. This option is ignored if
* generateHints is false.
*/
@@ -84,10 +89,11 @@ public class AnalysisOptions {
/**
* Constructor for {@link AnalysisOptions}.
*/
- public AnalysisOptions(Boolean enableAsync, Boolean enableDeferredLoading, Boolean enableEnums, Boolean generateDart2jsHints, Boolean generateHints, Boolean generateLints) {
+ public AnalysisOptions(Boolean enableAsync, Boolean enableDeferredLoading, Boolean enableEnums, Boolean enableNullAwareOperators, Boolean generateDart2jsHints, Boolean generateHints, Boolean generateLints) {
this.enableAsync = enableAsync;
this.enableDeferredLoading = enableDeferredLoading;
this.enableEnums = enableEnums;
+ this.enableNullAwareOperators = enableNullAwareOperators;
this.generateDart2jsHints = generateDart2jsHints;
this.generateHints = generateHints;
this.generateLints = generateLints;
@@ -101,6 +107,7 @@ public class AnalysisOptions {
ObjectUtilities.equals(other.enableAsync, enableAsync) &&
ObjectUtilities.equals(other.enableDeferredLoading, enableDeferredLoading) &&
ObjectUtilities.equals(other.enableEnums, enableEnums) &&
+ ObjectUtilities.equals(other.enableNullAwareOperators, enableNullAwareOperators) &&
ObjectUtilities.equals(other.generateDart2jsHints, generateDart2jsHints) &&
ObjectUtilities.equals(other.generateHints, generateHints) &&
ObjectUtilities.equals(other.generateLints, generateLints);
@@ -112,10 +119,11 @@ public class AnalysisOptions {
Boolean enableAsync = jsonObject.get("enableAsync") == null ? null : jsonObject.get("enableAsync").getAsBoolean();
Boolean enableDeferredLoading = jsonObject.get("enableDeferredLoading") == null ? null : jsonObject.get("enableDeferredLoading").getAsBoolean();
Boolean enableEnums = jsonObject.get("enableEnums") == null ? null : jsonObject.get("enableEnums").getAsBoolean();
+ Boolean enableNullAwareOperators = jsonObject.get("enableNullAwareOperators") == null ? null : jsonObject.get("enableNullAwareOperators").getAsBoolean();
Boolean generateDart2jsHints = jsonObject.get("generateDart2jsHints") == null ? null : jsonObject.get("generateDart2jsHints").getAsBoolean();
Boolean generateHints = jsonObject.get("generateHints") == null ? null : jsonObject.get("generateHints").getAsBoolean();
Boolean generateLints = jsonObject.get("generateLints") == null ? null : jsonObject.get("generateLints").getAsBoolean();
- return new AnalysisOptions(enableAsync, enableDeferredLoading, enableEnums, generateDart2jsHints, generateHints, generateLints);
+ return new AnalysisOptions(enableAsync, enableDeferredLoading, enableEnums, enableNullAwareOperators, generateDart2jsHints, generateHints, generateLints);
}
public static List<AnalysisOptions> fromJsonArray(JsonArray jsonArray) {
@@ -131,7 +139,7 @@ public class AnalysisOptions {
}
/**
- * Deprecated/
+ * Deprecated
*
* True if the client wants to enable support for the proposed async feature.
*/
@@ -140,7 +148,7 @@ public class AnalysisOptions {
}
/**
- * Deprecated/
+ * Deprecated
*
* True if the client wants to enable support for the proposed deferred loading feature.
*/
@@ -149,7 +157,7 @@ public class AnalysisOptions {
}
/**
- * Deprecated/
+ * Deprecated
*
* True if the client wants to enable support for the proposed enum feature.
*/
@@ -158,6 +166,13 @@ public class AnalysisOptions {
}
/**
+ * True if the client wants to enable support for the proposed "null aware operators" feature.
+ */
+ public Boolean getEnableNullAwareOperators() {
+ return enableNullAwareOperators;
+ }
+
+ /**
* True if hints that are specific to dart2js should be generated. This option is ignored if
* generateHints is false.
*/
@@ -185,6 +200,7 @@ public class AnalysisOptions {
builder.append(enableAsync);
builder.append(enableDeferredLoading);
builder.append(enableEnums);
+ builder.append(enableNullAwareOperators);
builder.append(generateDart2jsHints);
builder.append(generateHints);
builder.append(generateLints);
@@ -202,6 +218,9 @@ public class AnalysisOptions {
if (enableEnums != null) {
jsonObject.addProperty("enableEnums", enableEnums);
}
+ if (enableNullAwareOperators != null) {
+ jsonObject.addProperty("enableNullAwareOperators", enableNullAwareOperators);
+ }
if (generateDart2jsHints != null) {
jsonObject.addProperty("generateDart2jsHints", generateDart2jsHints);
}
@@ -224,6 +243,8 @@ public class AnalysisOptions {
builder.append(enableDeferredLoading + ", ");
builder.append("enableEnums=");
builder.append(enableEnums + ", ");
+ builder.append("enableNullAwareOperators=");
+ builder.append(enableNullAwareOperators + ", ");
builder.append("generateDart2jsHints=");
builder.append(generateDart2jsHints + ", ");
builder.append("generateHints=");

Powered by Google App Engine
This is Rietveld 408576698