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

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

Issue 475673002: Generate public static EMPTY_ARRAY fields for each object. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: review Created 6 years, 4 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/CompletionSuggestion.java
diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/CompletionSuggestion.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/CompletionSuggestion.java
index 0ec91d6306efa4a210982133f67d446789f80d49..31028e210fc5bb42b4845e449a53fcff45ffd0ad 100644
--- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/CompletionSuggestion.java
+++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/CompletionSuggestion.java
@@ -32,6 +32,21 @@ import org.apache.commons.lang3.StringUtils;
public class CompletionSuggestion {
/**
+ * An empty array of {@link CompletionSuggestion}s.
+ */
+ public static final CompletionSuggestion[] EMPTY_ARRAY = new CompletionSuggestion[0];
+
+ /**
+ * The kind of element being suggested.
+ */
+ private final String kind;
+
+ /**
+ * The relevance of this completion suggestion.
+ */
+ private final String relevance;
+
+ /**
* The identifier to be inserted if the suggestion is selected. If the suggestion is for a method
* or function, the client might want to additionally insert a template for the parameters. The
* information required in order to do so is contained in other fields.
@@ -39,22 +54,15 @@ public class CompletionSuggestion {
private final String completion;
/**
- * The class that declares the element being suggested. This field is omitted if the suggested
- * element is not a member of a class.
- */
- private final String declaringType;
-
- /**
- * The Dartdoc associated with the element being suggested, This field is omitted if there is no
- * Dartdoc associated with the element.
+ * The offset, relative to the beginning of the completion, of where the selection should be placed
+ * after insertion.
*/
- private final String docComplete;
+ private final int selectionOffset;
/**
- * An abbreviated version of the Dartdoc associated with the element being suggested, This field is
- * omitted if there is no Dartdoc associated with the element.
+ * The number of characters that should be selected after insertion.
*/
- private final String docSummary;
+ private final int selectionLength;
/**
* True if the suggested element is deprecated.
@@ -68,44 +76,40 @@ public class CompletionSuggestion {
private final boolean isPotential;
/**
- * The kind of element being suggested.
- */
- private final String kind;
-
- /**
- * The name of the optional parameter being suggested. This field is omitted if the suggestion is
- * not the addition of an optional argument within an argument list.
+ * An abbreviated version of the Dartdoc associated with the element being suggested, This field is
+ * omitted if there is no Dartdoc associated with the element.
*/
- private final String parameterName;
+ private final String docSummary;
/**
- * The names of the parameters of the function or method being suggested. This field is omitted if
- * the suggested element is not a setter, function or method.
+ * The Dartdoc associated with the element being suggested, This field is omitted if there is no
+ * Dartdoc associated with the element.
*/
- private final List<String> parameterNames;
+ private final String docComplete;
/**
- * The type of the options parameter being suggested. This field is omitted if the parameterName
- * field is omitted.
+ * The class that declares the element being suggested. This field is omitted if the suggested
+ * element is not a member of a class.
*/
- private final String parameterType;
+ private final String declaringType;
/**
- * The types of the parameters of the function or method being suggested. This field is omitted if
- * the parameterNames field is omitted.
+ * The return type of the getter, function or method being suggested. This field is omitted if the
+ * suggested element is not a getter, function or method.
*/
- private final List<String> parameterTypes;
+ private final String returnType;
/**
- * The number of positional parameters for the function or method being suggested. This field is
- * omitted if the parameterNames field is omitted.
+ * The names of the parameters of the function or method being suggested. This field is omitted if
+ * the suggested element is not a setter, function or method.
*/
- private final int positionalParameterCount;
+ private final List<String> parameterNames;
/**
- * The relevance of this completion suggestion.
+ * The types of the parameters of the function or method being suggested. This field is omitted if
+ * the parameterNames field is omitted.
*/
- private final String relevance;
+ private final List<String> parameterTypes;
/**
* The number of required parameters for the function or method being suggested. This field is
@@ -114,21 +118,22 @@ public class CompletionSuggestion {
private final int requiredParameterCount;
/**
- * The return type of the getter, function or method being suggested. This field is omitted if the
- * suggested element is not a getter, function or method.
+ * The number of positional parameters for the function or method being suggested. This field is
+ * omitted if the parameterNames field is omitted.
*/
- private final String returnType;
+ private final int positionalParameterCount;
/**
- * The number of characters that should be selected after insertion.
+ * The name of the optional parameter being suggested. This field is omitted if the suggestion is
+ * not the addition of an optional argument within an argument list.
*/
- private final int selectionLength;
+ private final String parameterName;
/**
- * The offset, relative to the beginning of the completion, of where the selection should be placed
- * after insertion.
+ * The type of the options parameter being suggested. This field is omitted if the parameterName
+ * field is omitted.
*/
- private final int selectionOffset;
+ private final String parameterType;
/**
* Constructor for {@link CompletionSuggestion}.

Powered by Google App Engine
This is Rietveld 408576698