File tree Expand file tree Collapse file tree 9 files changed +21
-21
lines changed
test/src/services/correction
analyzer_plugin/lib/utilities/change_builder Expand file tree Collapse file tree 9 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ class DartDocumentationComputer {
2323 _ => elementBeingDocumented,
2424 };
2525 if (element == null ) {
26- // This can happen when the code is invalid, such as having a field formal
27- // parameter for a field that does not exist.
26+ // This can happen when the code is invalid, such as having an
27+ // initializing formal parameter for a field that does not exist.
2828 return null ;
2929 }
3030
Original file line number Diff line number Diff line change @@ -106,10 +106,10 @@ abstract final class DartAssistKind {
106106 DartAssistKindPriority .DEFAULT ,
107107 'Convert to double quoted string' ,
108108 );
109- static const CONVERT_TO_FIELD_PARAMETER = AssistKind (
110- 'dart.assist.convert.toConstructorFieldParameter ' ,
109+ static const CONVERT_TO_INITIALIZING_FORMAL = AssistKind (
110+ 'dart.assist.convert.toInitializingFormal ' ,
111111 DartAssistKindPriority .DEFAULT ,
112- 'Convert to field formal parameter' ,
112+ 'Convert to initializing formal parameter' ,
113113 );
114114 static const CONVERT_TO_FOR_ELEMENT = AssistKind (
115115 'dart.assist.convert.toForElement' ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class AddFieldFormalParameters extends ResolvedCorrectionProducer {
2020 CorrectionApplicability .singleLocation;
2121
2222 @override
23- FixKind get fixKind => DartFixKind .ADD_FIELD_FORMAL_PARAMETERS ;
23+ FixKind get fixKind => DartFixKind .ADD_INITIALIZING_FORMAL_PARAMETERS ;
2424
2525 @override
2626 Future <void > compute (ChangeBuilder builder) async {
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class ConvertToFieldParameter extends ResolvedCorrectionProducer {
2222 CorrectionApplicability .singleLocation;
2323
2424 @override
25- AssistKind get assistKind => DartAssistKind .CONVERT_TO_FIELD_PARAMETER ;
25+ AssistKind get assistKind => DartAssistKind .CONVERT_TO_INITIALIZING_FORMAL ;
2626
2727 @override
2828 Future <void > compute (ChangeBuilder builder) async {
Original file line number Diff line number Diff line change @@ -730,18 +730,18 @@ CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER:
730730CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR :
731731 status : needsFix
732732 notes : |-
733- Replace the field formal parameter with a normal parameter.
733+ Replace the initializing formal parameter with a normal parameter.
734734CompileTimeErrorCode.FIELD_INITIALIZER_NOT_ASSIGNABLE :
735735 status : noFix
736736CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR :
737737 status : needsFix
738738 notes : |-
739- Replace the field formal parameter with a normal parameter and add an
740- assignment to the field in the method.
739+ Replace the initializing formal parameter with a normal parameter and
740+ add an assignment to the field in the method.
741741CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR :
742742 status : needsFix
743743 notes : |-
744- Replace the field formal parameter with a normal parameter.
744+ Replace the initializing formal parameter with a normal parameter.
745745CompileTimeErrorCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE :
746746 status : noFix
747747CompileTimeErrorCode.FINAL_CLASS_EXTENDED_OUTSIDE_OF_LIBRARY :
Original file line number Diff line number Diff line change @@ -157,10 +157,10 @@ abstract final class DartFixKind {
157157 DartFixKindPriority .inFile,
158158 'Add cast everywhere in file' ,
159159 );
160- static const ADD_FIELD_FORMAL_PARAMETERS = FixKind (
161- 'dart.fix.add.fieldFormalParameters ' ,
160+ static const ADD_INITIALIZING_FORMAL_PARAMETERS = FixKind (
161+ 'dart.fix.add.initializingFormalParameters ' ,
162162 70 ,
163- 'Add final field formal parameters' ,
163+ 'Add final initializing formal parameters' ,
164164 );
165165 static const ADD_KEY_TO_CONSTRUCTORS = FixKind (
166166 'dart.fix.add.keyToConstructors' ,
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ void main() {
1717@reflectiveTest
1818class ConvertToFieldParameterTest extends AssistProcessorTest {
1919 @override
20- AssistKind get kind => DartAssistKind .CONVERT_TO_FIELD_PARAMETER ;
20+ AssistKind get kind => DartAssistKind .CONVERT_TO_INITIALIZING_FORMAL ;
2121
2222 Future <void > test_additionalUse () async {
2323 await resolveTestCode ('''
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ void main() {
1717@reflectiveTest
1818class AddFieldFormalParametersTest extends FixProcessorTest {
1919 @override
20- FixKind get kind => DartFixKind .ADD_FIELD_FORMAL_PARAMETERS ;
20+ FixKind get kind => DartFixKind .ADD_INITIALIZING_FORMAL_PARAMETERS ;
2121
2222 Future <void > test_flutter_nullable () async {
2323 writeTestPackageConfig (flutter: true );
Original file line number Diff line number Diff line change @@ -67,11 +67,11 @@ abstract class DartEditBuilder implements EditBuilder {
6767 /// parameters (enclosing parenthesis are written for you). Otherwise, if an
6868 /// [argumentList] is provided then the constructor will have parameters that
6969 /// match the given arguments. If no argument list is given, but a list of
70- /// [fieldNames] is provided, then field formal parameters will be created for
71- /// each of the field names. If an [initializerWriter] is provided then it is
72- /// used to write the constructor initializers (the ` : ` prefix is written
73- /// for you). If a [bodyWriter] is provided then it is used to write the
74- /// constructor body, otherwise an empty body is written.
70+ /// [fieldNames] is provided, then initializing formal parameters will be
71+ /// created for each of the field names. If an [initializerWriter] is provided
72+ /// then it is used to write the constructor initializers (the ` : ` prefix is
73+ /// written for you). If a [bodyWriter] is provided then it is used to write
74+ /// the constructor body, otherwise an empty body is written.
7575 void writeConstructorDeclaration (String className,
7676 {ArgumentList ? argumentList,
7777 void Function ()? bodyWriter,
You can’t perform that action at this time.
0 commit comments