Skip to content

Commit 5054301

Browse files
committed
Update code action IDs
1 parent 84e16fd commit 5054301

2 files changed

Lines changed: 53 additions & 6 deletions

File tree

_docs/refactorings-and-code-fixes.md

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Note: These IDs are only provided by recent versions of the Dart analysis server
1212

1313
- `quickfix.add.async` - Add 'async' modifier
1414
- `quickfix.add.await` - Add 'await' keyword
15-
- `quickfix.add.await.multi` - Add 'await's everywhere in file
1615
- `quickfix.add.callSuper` - Add 'super....'
1716
- `quickfix.add.class.modifier.base` - Add 'base' modifier
1817
- `quickfix.add.class.modifier.base.multi` - Add 'base' modifier everywhere in file
@@ -35,6 +34,7 @@ Note: These IDs are only provided by recent versions of the Dart analysis server
3534
- `quickfix.add.explicitCast` - Add cast
3635
- `quickfix.add.explicitCast.multi` - Add cast everywhere in file
3736
- `quickfix.add.extensionOverride` - Add an extension override for '...'
37+
- `quickfix.add.initializingFormalNamedParameters` - Add final initializing formal required named parameters
3838
- `quickfix.add.initializingFormalParameters` - Add final initializing formal parameters
3939
- `quickfix.add.keyToConstructors` - Add 'key' to constructors
4040
- `quickfix.add.keyToConstructors.multi` - Add 'key' to constructors everywhere in file
@@ -70,6 +70,7 @@ Note: These IDs are only provided by recent versions of the Dart analysis server
7070
- `quickfix.add.typeAnnotation` - Add type annotation
7171
- `quickfix.add.typeAnnotation.multi` - Add type annotations everywhere in file
7272
- `quickfix.change.argumentName` - Change to '...'
73+
- `quickfix.change.to` - Change to '...'
7374
- `quickfix.change.toNearestPreciseValue` - Change to nearest precise int-as-double value: ...
7475
- `quickfix.change.toStaticAccess` - Change access to static using '...'
7576
- `quickfix.change.typeAnnotation` - Change '...' to '...' type annotation
@@ -84,6 +85,7 @@ Note: These IDs are only provided by recent versions of the Dart analysis server
8485
- `quickfix.convert.nullCheckToNullAwareElement.multi` - Convert null check to null-aware element in file
8586
- `quickfix.convert.quotes` - Convert the quotes and remove escapes
8687
- `quickfix.convert.quotes.multi` - Convert the quotes and remove escapes everywhere in file
88+
- `quickfix.convert.relatedToCascade` - Convert this and related to cascade notation
8789
- `quickfix.convert.toBoolExpression` - Convert to boolean expression
8890
- `quickfix.convert.toBoolExpression.multi` - Convert to boolean expressions everywhere in file
8991
- `quickfix.convert.toCascade` - Convert to cascade notation
@@ -144,19 +146,33 @@ Note: These IDs are only provided by recent versions of the Dart analysis server
144146
- `quickfix.convert.toWhereType.multi` - Convert to using 'whereType' everywhere in file
145147
- `quickfix.convert.toWildcardPattern` - Convert to wildcard pattern
146148
- `quickfix.convert.toWildcardVariable` - Convert to wildcard variable
147-
- `quickfix.create.class` - Create class '...'
149+
- `quickfix.create.class.lowercase` - Create class '...'
150+
- `quickfix.create.class.lowercase.with` - Create class '...'
151+
- `quickfix.create.class.uppercase` - Create class '...'
152+
- `quickfix.create.class.uppercase.with` - Create class '...'
148153
- `quickfix.create.constructor` - Create constructor '...'
149154
- `quickfix.create.constructorForFinalFields` - Create constructor for final fields
150155
- `quickfix.create.constructorSuper` - Create constructor to call ...
156+
- `quickfix.create.extension.getter` - Create extension getter '...'
157+
- `quickfix.create.extension.method` - Create extension method '...'
158+
- `quickfix.create.extension.operator` - Create extension operator '...'
159+
- `quickfix.create.extension.setter` - Create extension setter '...'
151160
- `quickfix.create.field` - Create field '...'
152161
- `quickfix.create.file` - Create file '...'
153162
- `quickfix.create.function` - Create function '...'
163+
- `quickfix.create.function.tearoff` - Create function '...'
154164
- `quickfix.create.getter` - Create getter '...'
155165
- `quickfix.create.localVariable` - Create local variable '...'
156166
- `quickfix.create.method` - Create method '...'
157167
- `quickfix.create.method.multi` - Create methods in file
158-
- `quickfix.create.mixin` - Create mixin '...'
168+
- `quickfix.create.method.tearoff` - Create method '...'
169+
- `quickfix.create.missingOverrides` - Create ... missing override...
170+
- `quickfix.create.mixin.lowercase` - Create mixin '...'
171+
- `quickfix.create.mixin.lowercase.with` - Create mixin '...'
172+
- `quickfix.create.mixin.uppercase` - Create mixin '...'
173+
- `quickfix.create.mixin.uppercase.with` - Create mixin '...'
159174
- `quickfix.create.noSuchMethod` - Create 'noSuchMethod' method
175+
- `quickfix.create.operator` - Create operator '...'
160176
- `quickfix.create.parameter` - Create required positional parameter '...'
161177
- `quickfix.create.setter` - Create setter '...'
162178
- `quickfix.dataDriven` - ...
@@ -166,8 +182,31 @@ Note: These IDs are only provided by recent versions of the Dart analysis server
166182
- `quickfix.flutter.convert.childrenToChild` - Convert to child:
167183
- `quickfix.flutter.makeConditionalOnDebugMode` - Make conditional on 'kDebugMode'
168184
- `quickfix.flutter.wrap.text` - Wrap in a 'Text' widget
169-
- `quickfix.import.async` - Import 'dart:async'
185+
- `quickfix.import.libraryCombinator` - Import '...' from ...
186+
- `quickfix.import.libraryCombinatorMultiple` - Import '...' and ... other... from ...
170187
- `quickfix.import.libraryHide` - Hide others to use '...' from '...'...
188+
- `quickfix.import.libraryPrefix` - Use imported library '...' with prefix '...'
189+
- `quickfix.import.libraryProject1` - Import library '...'
190+
- `quickfix.import.libraryProject1Prefixed` - Import library '...' with prefix '...'
191+
- `quickfix.import.libraryProject1PrefixedShow` - Import library '...' with prefix '...' and 'show'
192+
- `quickfix.import.libraryProject1Show` - Import library '...' with 'show'
193+
- `quickfix.import.libraryProject2` - Import library '...'
194+
- `quickfix.import.libraryProject2Prefixed` - Import library '...' with prefix '...'
195+
- `quickfix.import.libraryProject2PrefixedShow` - Import library '...' with prefix '...' and 'show'
196+
- `quickfix.import.libraryProject2Show` - Import library '...' with 'show'
197+
- `quickfix.import.libraryProject3` - Import library '...'
198+
- `quickfix.import.libraryProject3Prefixed` - Import library '...' with prefix '...'
199+
- `quickfix.import.libraryProject3PrefixedShow` - Import library '...' with prefix '...' and 'show'
200+
- `quickfix.import.libraryProject3Show` - Import library '...' with 'show'
201+
- `quickfix.import.libraryRemoveShow` - Remove show to use '...' from '...'...
202+
- `quickfix.import.librarySdk` - Import library '...'
203+
- `quickfix.import.librarySdkPrefixed` - Import library '...' with prefix '...'
204+
- `quickfix.import.librarySdkPrefixedShow` - Import library '...' with prefix '...' and 'show'
205+
- `quickfix.import.librarySdkShow` - Import library '...' with 'show'
206+
- `quickfix.inlineInvocation` - Inline invocation of '...'
207+
- `quickfix.inlineInvocation.multi` - Inline invocations everywhere in file
208+
- `quickfix.inlineTypedef` - Inline the definition of '...'
209+
- `quickfix.inlineTypedef.multi` - Inline type definitions everywhere in file
171210
- `quickfix.insertBody` - Insert body
172211
- `quickfix.insertOnKeyword` - Insert 'on' keyword
173212
- `quickfix.insertOnKeyword.multi` - Insert 'on' keyword in file
@@ -186,8 +225,10 @@ Note: These IDs are only provided by recent versions of the Dart analysis server
186225
- `quickfix.makeVariableNullable` - Make '...' nullable
187226
- `quickfix.matchAnyMap` - Match any map
188227
- `quickfix.matchEmptyMap` - Match an empty map
228+
- `quickfix.mergeCombinatorsHide.hide` - Merge combinators into a single 'hide'
189229
- `quickfix.mergeCombinatorsHide.show` - Merge combinators into a single 'hide'
190230
- `quickfix.mergeCombinatorsShow.hide` - Merge combinators into a single 'show'
231+
- `quickfix.mergeCombinatorsShow.show` - Merge combinators into a single 'show'
191232
- `quickfix.moveAnnotationToLibraryDirective` - Move this annotation to a library directive
192233
- `quickfix.moveDocCommentToLibraryDirective` - Move this doc comment to a library directive
193234
- `quickfix.moveTypeArgumentsToClass` - Move type arguments to after class name
@@ -415,17 +456,22 @@ Note: These IDs are only provided by recent versions of the Dart analysis server
415456
- `quickfix.wrap.unawaited` - Wrap in 'unawaited'
416457
- `refactor.add.diagnosticPropertyReference` - Add a debug reference to this property
417458
- `refactor.add.digitSeparators` - Add digit separators
459+
- `refactor.add.late` - Add 'late' modifier
418460
- `refactor.add.returnType` - Add return type
419461
- `refactor.add.showCombinator` - Add explicit 'show' combinator
420462
- `refactor.add.typeAnnotation` - Add type annotation
421463
- `refactor.assignToVariable` - Assign value to new local variable
464+
- `refactor.bindAllToFields` - Bind all parameters to fields
465+
- `refactor.bindToField` - Bind parameter to field
466+
- `refactor.convert.ToDotShorthand` - Convert to dot shorthand
422467
- `refactor.convert.blockComment` - Convert to block documentation comment
423468
- `refactor.convert.bodyToAsync` - Convert to async function body
424469
- `refactor.convert.bodyToBlock` - Convert to block body
425470
- `refactor.convert.bodyToExpression` - Convert to expression body
426471
- `refactor.convert.classToEnum` - Convert class to an enum
427472
- `refactor.convert.classToMixin` - Convert class to a mixin
428473
- `refactor.convert.conditionalToIfElse` - Replace conditional with 'if-else'
474+
- `refactor.convert.fieldFormalToNormal` - Convert to a normal parameter
429475
- `refactor.convert.finalFieldToGetter` - Convert '...' to a getter
430476
- `refactor.convert.forEachToForIndex` - Convert to for-index loop
431477
- `refactor.convert.getterToFinalField` - Convert to final field

tool/generate_code_action_list.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ main() {
1414
...extractIDs(File(assistFilePath), 'AssistKind'),
1515
];
1616

17-
ids.sort((c1, c2) => c1.id != c2.id ? c1.id.compareTo(c2.id) : c1.name.compareTo(c2.name));
17+
ids.sort((c1, c2) =>
18+
c1.id != c2.id ? c1.id.compareTo(c2.id) : c1.name.compareTo(c2.name));
1819

1920
printCodeActionsList(ids);
2021
print('');
@@ -24,7 +25,7 @@ main() {
2425
List<CodeAction> extractIDs(File file, String type) {
2526
final fileContents = file.readAsStringSync();
2627
final matches = RegExp(
27-
'${RegExp.escape(type)}[\\s\\n]*\\([\\s\\n]*\'([\\w.]+)\',[\\s\\n]*[\\d\\w\\.]+,[\\s\\n]*["\']([\\w. \\{\\}\'"&+@?:=;!\\\\<>-]+)["\']')
28+
'${RegExp.escape(type)}[\\s\\n]*\\([\\s\\n]*\'([\\w.]+)\',[\\s\\n]*[\\d\\w\\. +\\-]+,[\\s\\n]*["\']([\\w. \\{\\}\'"&+@?:=;!\\\\<>-]+)["\']')
2829
.allMatches(fileContents);
2930
return matches.map((match) {
3031
final id = match

0 commit comments

Comments
 (0)