| Index: pkg/analysis_server/lib/utilities/change_builder_dart.dart
|
| diff --git a/pkg/analysis_server/lib/utilities/change_builder_dart.dart b/pkg/analysis_server/lib/utilities/change_builder_dart.dart
|
| index cfe90322bf28f20fa2208175314d9eaa7fc730c9..b81b22a96a226bfae799f602e312714f5458d405 100644
|
| --- a/pkg/analysis_server/lib/utilities/change_builder_dart.dart
|
| +++ b/pkg/analysis_server/lib/utilities/change_builder_dart.dart
|
| @@ -44,15 +44,59 @@ abstract class DartEditBuilder extends EditBuilder {
|
| static const String SUPERCLASS_GROUP_ID = 'SUPERCLASS';
|
|
|
| /**
|
| - * Write the code for a declaration of a class with the given [name]. If
|
| - * [isAbstract] is `true`, then the class will be abstract. If a [superclass]
|
| - * is given then it will be the superclass of the class.
|
| + * Write the code for a declaration of a class with the given [name]. If a
|
| + * list of [interfaces] is provided, then the class will implement those
|
| + * interfaces. If [isAbstract] is `true`, then the class will be abstract. If
|
| + * a [memberWriter] is provided, then it will be invoked to allow members to
|
| + * be generated. (The members will automatically be preceeded and followed by
|
| + * end-of-line markers.) If a list of [mixins] is provided, then the class
|
| + * will mix in those classes. If a [nameGroupName] is provided, then the name
|
| + * of the class will be included in the linked edit group with that name. If a
|
| + * [superclass] is given then it will be the superclass of the class. (If a
|
| + * list of [mixins] is provided but no [superclass] is given then the class
|
| + * will extend `Object`.)
|
| */
|
| - void writeClassDeclaration(String name,
|
| - {bool isAbstract: false, DartType superclass});
|
| + void writeClassDeclaration(String name, {Iterable<DartType> interfaces,
|
| + bool isAbstract: false, void memberWriter(), Iterable<DartType> mixins,
|
| + String nameGroupName, DartType superclass});
|
|
|
| /**
|
| - * Append a placeholder for an override of an inherited [member].
|
| + * Write the code for a declaration of a field with the given [name]. If an
|
| + * [initializerWriter] is provided, it will be invoked to write the content of
|
| + * the initializer. (The equal sign separating the field name from the
|
| + * initializer expression will automatically be written.) If [isConst] is
|
| + * `true`, then the declaration will be preceeded by the `const` keyword. If
|
| + * [isFinal] is `true`, then the declaration will be preceeded by the `final`
|
| + * keyword. (If both [isConst] and [isFinal] are `true`, then only the `const`
|
| + * keyword will be written.) If [isStatic] is `true`, then the declaration
|
| + * will be preceeded by the `static` keyword. If a [nameGroupName] is
|
| + * provided, the name of the field will be included in the linked edit group
|
| + * with that name. If a [type] is provided, then it will be used as the type
|
| + * of the field. (The keyword `var` will be provided automatically when
|
| + * required.) If a [typeGroupName] is provided, then if a type was written
|
| + * it will be in the linked edit group with that name.
|
| + */
|
| + void writeFieldDeclaration(String name, {void initializerWriter(),
|
| + bool isConst: false, bool isFinal: false, bool isStatic: false,
|
| + String nameGroupName, DartType type, String typeGroupName});
|
| +
|
| + /**
|
| + * Write the code for a declaration of a getter with the given [name]. If a
|
| + * [bodyWriter] is provided, it will be invoked to write the body of the
|
| + * getter. (The space between the name and the body will automatically be
|
| + * written.) If [isStatic] is `true`, then the declaration will be preceeded
|
| + * by the `static` keyword. If a [nameGroupName] is provided, the name of the
|
| + * getter will be included in the linked edit group with that name. If a
|
| + * [returnType] is provided, then it will be used as the return type of the
|
| + * getter. If a [returnTypeGroupName] is provided, then if a return type was
|
| + * written it will be in the linked edit group with that name.
|
| + */
|
| + void writeGetterDeclaration(String name, {void bodyWriter(),
|
| + bool isStatic: false, String nameGroupName, DartType returnType,
|
| + String returnTypeGroupName});
|
| +
|
| + /**
|
| + * Append a placeholder for an override of the specified inherited [member].
|
| */
|
| void writeOverrideOfInheritedMember(ExecutableElement member);
|
|
|
| @@ -86,8 +130,8 @@ abstract class DartEditBuilder extends EditBuilder {
|
| * `true`, then all of the supertypes of the [type] will be added as
|
| * suggestions for alternatives to the type name.
|
| */
|
| - bool writeType(DartType type,
|
| - {bool addSupertypeProposals: false, String groupName, bool required: false});
|
| + bool writeType(DartType type, {bool addSupertypeProposals: false,
|
| + String groupName, bool required: false});
|
| }
|
|
|
| /**
|
|
|