Version 2.18.0-268.0.dev

Merge commit '3873099b6d3a7ea6c13a45f2c5bcd57f09a3d217' into 'dev'
diff --git a/DEPS b/DEPS
index e9818b9..a5ad7c5 100644
--- a/DEPS
+++ b/DEPS
@@ -135,7 +135,7 @@
   "path_rev": "7a0ed40280345b1c11df4c700c71e590738f4257",
   "ply_rev": "604b32590ffad5cbb82e4afef1d305512d06ae93",
   "pool_rev": "fa84ddd0e39f45bf3f09dcc5d6b9fbdda7820fef",
-  "protobuf_rev": "7b20134b5609a4d25a57c7396e91b93ba60888d5",
+  "protobuf_rev": "2d6c6037cee6c5f683e8f38e598443f9bec74b94",
   "pub_rev": "9bf4289d6fd5d6872a8929d6312bbd7098f3ea9c", # manually rev'd
   "pub_semver_rev": "5c0b4bfd5ca57fe16f1319c581dc8c882e9b8cb2",
   "root_certificates_rev": "692f6d6488af68e0121317a9c2c9eb393eb0ee50",
diff --git a/pkg/analysis_server/doc/tutorial/quick_fix.md b/pkg/analysis_server/doc/tutorial/quick_fix.md
index 8f1596b..57c874a 100644
--- a/pkg/analysis_server/doc/tutorial/quick_fix.md
+++ b/pkg/analysis_server/doc/tutorial/quick_fix.md
@@ -24,10 +24,11 @@
 A single-site fix is one in which a single fix can be applied to a single
 location at which the associated diagnostic is reported.
 
-When the client asks for quick fixes, the analysis server computes the relevant
-diagnostics based on the cursor location. Then, for each diagnostic, it computes
-one or more fixes. It then returns the list of computed fixes to the client. The
-client typically allows the user to choose a single fix to be applied.
+When the client asks for quick fixes at a given location, the analysis server
+computes the relevant diagnostics based on that location. Then, for each
+diagnostic, it computes one or more fixes. It then returns the list of computed
+fixes to the client. The client typically allows the user to choose a single fix
+to be applied.
 
 ### Design considerations
 
@@ -37,7 +38,7 @@
 code to compute a quick fix can't perform any potentially lengthy computations
 such as searching all of the user's code or accessing the network. That, in
 turn, generally means that fixes can only support localized changes. They can
-add or remove text in the file in which the diagnostic was reported, but
+add or remove text in the library in which the diagnostic was reported, but
 generally can't do more than that. 
 
 ### Describing the fix
@@ -80,10 +81,11 @@
 To implement the fix you'll create a subclass of `CorrectionProducer`. Most of
 the existing correction producers are in the directory
 `analysis_server/lib/src/services/correction/dart`, so we'll start by creating
-a file named `add_final.dart` in that directory that contains the following:
+a file named `add_final.dart` in that directory that contains the following
+(with the year updated appropriately):
 
 ```dart
-// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -99,9 +101,6 @@
   @override
   Future<void> compute(ChangeBuilder builder) async {
   }
-
-  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
-  static AddFinal newInstance() => AddFinal();
 }
 ```
 
@@ -111,16 +110,14 @@
 The `fixKind` getter is how you associate the fix kind we created earlier with
 the fix produced by the `compute` method.
 
-The static `newInstance` method will be used later in "Registering the fix".
-
 There's another getter you might need to override. The message associated with
 the fix kind is actually a template that can be filled in at runtime. The
 placeholders in the message are denoted by integers inside curly braces (such as
-`{0}`). The integers are indexes into a list of replacement values, and the
-getter `fixArguments` returns the list of replacement values. The message we
-used above doesn't have any placeholders, but if we'd written the message as
-`"Add '{0}' modifier"`, then we could return the replacement values by
-implementing:
+`{0}`). The integers are indexes into a list of replacement values (hence, zero
+based), and the getter `fixArguments` returns the list of replacement values.
+The message we used above doesn't have any placeholders, but if we'd written the
+message as `"Add '{0}' modifier"`, then we could return the replacement values
+by implementing something like:
 
 ```dart
 @override
@@ -129,19 +126,20 @@
 
 If you don't implement this getter, then the inherited getter will return an
 empty list. The number of elements in the list must match the largest index used
-in the message.
+in the message. If it doesn't, then an exception will be thrown at runtime.
 
 ### Testing the fix
 
 Before we look at implementing the `compute` method, we should probably write
 some tests. Even if you don't normally use a test-driven approach to coding, we
-recommend it in this case because writing the tests can help you think of corner
-cases that the implementation will need to handle. The corresponding tests are
-in the directory `analysis_server/test/src/services/correction/fix`, so we'll
+recommend it when writing fixes because writing the tests can help you think of
+corner cases that the implementation will need to handle. The corresponding
+tests are in the directory `analysis_server/test/src/services/correction/fix`,
+so we'll
 create a file named `add_final_test.dart` that contains the following:
 
 ```dart
-// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -168,8 +166,10 @@
 }
 ```
 
-These two getters tell the test framework to enable the lint being fixed and to
-expect a fix of the expected kind.
+The two getters in the test class tell the test framework to enable the lint
+being fixed and to expect a fix of the expected kind. Unless there's already a
+fix associated with the lint you'll likely need to add a new constant in
+`LintNames`.
 
 The test can then be written in a method that looks something like this:
 
@@ -193,9 +193,9 @@
 ```
 
 The test framework will create a file containing the first piece of code, run
-the lint over the code, use our correction producer to build a fix, apply the
-fix to the file, and textually compare the results with the second piece of
-code.
+the lint over the code, use the correction producer you wrote to build a fix,
+apply the fix to the file, and textually compare the results with the second
+piece of code.
 
 ### Registering the fix
 
@@ -217,8 +217,8 @@
 
 Actually, the tables contain lists of functions used to create the producers. We
 do that so that producers can't accidentally carry state over from one use to
-the next. These functions are usually a tear-off of the static method you
-defined in "Implementing the fix, part 1".
+the next. These functions are usually a tear-off of one of the correction
+producer's constructors.
 
 The last step is to add your correction producer to the appropriate map. If
 you're adding a fix for a lint, then you'd add an entry like
@@ -259,7 +259,7 @@
 For this example we're going to assume that the lint highlights the name of the
 field that could have been final. Finding the AST node is easy because it's done
 for you by the fix processor before `compute` is invoked. All you have to do is
-use the getter `node` to find the node at the offset of the lint's highlight
+use the getter `node` to find the node at the beginning of the lint's highlight
 region. We're expecting it to be the name of a field, so that's how we'll name
 the variable:
 
diff --git a/pkg/analysis_server/lib/src/services/correction/assist.dart b/pkg/analysis_server/lib/src/services/correction/assist.dart
index 43a169f..4816c43 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist.dart
@@ -33,408 +33,418 @@
 class DartAssistKind {
   static const ADD_DIAGNOSTIC_PROPERTY_REFERENCE = AssistKind(
     'dart.assist.add.diagnosticPropertyReference',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Add a debug reference to this property',
   );
   static const ADD_NOT_NULL_ASSERT = AssistKind(
     'dart.assist.add.notNullAssert',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Add a not-null assertion',
   );
   static const ADD_RETURN_TYPE = AssistKind(
     'dart.assist.add.returnType',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Add return type',
   );
   static const ADD_TYPE_ANNOTATION = AssistKind(
     'dart.assist.add.typeAnnotation',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Add type annotation',
   );
   static const ASSIGN_TO_LOCAL_VARIABLE = AssistKind(
     'dart.assist.assignToVariable',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Assign value to new local variable',
   );
   static const CONVERT_CLASS_TO_ENUM = AssistKind(
     'dart.assist.convert.classToEnum',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert class to an enum',
   );
   static const CONVERT_CLASS_TO_MIXIN = AssistKind(
     'dart.assist.convert.classToMixin',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert class to a mixin',
   );
   static const CONVERT_DOCUMENTATION_INTO_BLOCK = AssistKind(
     'dart.assist.convert.blockComment',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to block documentation comment',
   );
   static const CONVERT_DOCUMENTATION_INTO_LINE = AssistKind(
     'dart.assist.convert.lineComment',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to line documentation comment',
   );
   static const CONVERT_INTO_ASYNC_BODY = AssistKind(
     'dart.assist.convert.bodyToAsync',
-    31,
+    DartAssistKindPriority.PRIORITY,
     'Convert to async function body',
   );
   static const CONVERT_INTO_BLOCK_BODY = AssistKind(
     'dart.assist.convert.bodyToBlock',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to block body',
   );
   static const CONVERT_INTO_EXPRESSION_BODY = AssistKind(
     'dart.assist.convert.bodyToExpression',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to expression body',
   );
   static const CONVERT_INTO_FINAL_FIELD = AssistKind(
     'dart.assist.convert.getterToFinalField',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to final field',
   );
   static const CONVERT_INTO_FOR_INDEX = AssistKind(
     'dart.assist.convert.forEachToForIndex',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to for-index loop',
   );
   static const CONVERT_INTO_GENERIC_FUNCTION_SYNTAX = AssistKind(
     'dart.assist.convert.toGenericFunctionSyntax',
-    30,
+    DartAssistKindPriority.DEFAULT,
     "Convert into 'Function' syntax",
   );
   static const CONVERT_INTO_GETTER = AssistKind(
     'dart.assist.convert.finalFieldToGetter',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to getter',
   );
   static const CONVERT_INTO_IS_NOT = AssistKind(
     'dart.assist.convert.isNot',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to is!',
   );
   static const CONVERT_INTO_IS_NOT_EMPTY = AssistKind(
     'dart.assist.convert.isNotEmpty',
-    30,
+    DartAssistKindPriority.DEFAULT,
     "Convert to 'isNotEmpty'",
   );
   static const CONVERT_PART_OF_TO_URI = AssistKind(
     'dart.assist.convert.partOfToPartUri',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to use a URI',
   );
   static const CONVERT_TO_DOUBLE_QUOTED_STRING = AssistKind(
     'dart.assist.convert.toDoubleQuotedString',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to double quoted string',
   );
   static const CONVERT_TO_FIELD_PARAMETER = AssistKind(
     'dart.assist.convert.toConstructorFieldParameter',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to field formal parameter',
   );
   static const CONVERT_TO_FOR_ELEMENT = AssistKind(
     'dart.assist.convert.toForElement',
-    30,
+    DartAssistKindPriority.DEFAULT,
     "Convert to a 'for' element",
   );
   static const CONVERT_TO_IF_ELEMENT = AssistKind(
     'dart.assist.convert.toIfElement',
-    30,
+    DartAssistKindPriority.DEFAULT,
     "Convert to an 'if' element",
   );
   static const CONVERT_TO_INT_LITERAL = AssistKind(
     'dart.assist.convert.toIntLiteral',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to an int literal',
   );
   static const CONVERT_TO_LIST_LITERAL = AssistKind(
     'dart.assist.convert.toListLiteral',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to list literal',
   );
   static const CONVERT_TO_MAP_LITERAL = AssistKind(
     'dart.assist.convert.toMapLiteral',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to map literal',
   );
   static const CONVERT_TO_MULTILINE_STRING = AssistKind(
     'dart.assist.convert.toMultilineString',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to multiline string',
   );
   static const CONVERT_TO_NORMAL_PARAMETER = AssistKind(
     'dart.assist.convert.toConstructorNormalParameter',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to normal parameter',
   );
   static const CONVERT_TO_NULL_AWARE = AssistKind(
     'dart.assist.convert.toNullAware',
-    30,
+    DartAssistKindPriority.DEFAULT,
     "Convert to use '?.'",
   );
   static const CONVERT_TO_PACKAGE_IMPORT = AssistKind(
     'dart.assist.convert.relativeToPackageImport',
-    30,
+    DartAssistKindPriority.DEFAULT,
     "Convert to 'package:' import",
   );
   static const CONVERT_TO_RELATIVE_IMPORT = AssistKind(
     'dart.assist.convert.packageToRelativeImport',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to a relative import',
   );
   static const CONVERT_TO_SET_LITERAL = AssistKind(
     'dart.assist.convert.toSetLiteral',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to set literal',
   );
   static const CONVERT_TO_SINGLE_QUOTED_STRING = AssistKind(
     'dart.assist.convert.toSingleQuotedString',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to single quoted string',
   );
   static const CONVERT_TO_SPREAD = AssistKind(
     'dart.assist.convert.toSpread',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to a spread',
   );
   static const CONVERT_TO_SUPER_PARAMETERS = AssistKind(
     'dart.assist.convert.toSuperParameters',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to using super parameters',
   );
   static const ENCAPSULATE_FIELD = AssistKind(
     'dart.assist.encapsulateField',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Encapsulate field',
   );
   static const EXCHANGE_OPERANDS = AssistKind(
     'dart.assist.exchangeOperands',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Exchange operands',
   );
-
-  // Flutter assists
   static const FLUTTER_CONVERT_TO_CHILDREN = AssistKind(
     'dart.assist.flutter.convert.childToChildren',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to children:',
   );
   static const FLUTTER_CONVERT_TO_STATEFUL_WIDGET = AssistKind(
     'dart.assist.flutter.convert.toStatefulWidget',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to StatefulWidget',
   );
   static const FLUTTER_CONVERT_TO_STATELESS_WIDGET = AssistKind(
     'dart.assist.flutter.convert.toStatelessWidget',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Convert to StatelessWidget',
   );
-
-  // Flutter wrap specific assists
   static const FLUTTER_WRAP_GENERIC = AssistKind(
     'dart.assist.flutter.wrap.generic',
-    29,
+    DartAssistKindPriority.FLUTTER_WRAP_GENERAL,
     'Wrap with widget...',
   );
-
   static const FLUTTER_WRAP_BUILDER = AssistKind(
     'dart.assist.flutter.wrap.builder',
-    28,
+    DartAssistKindPriority.FLUTTER_WRAP_SPECIFIC,
     'Wrap with Builder',
   );
   static const FLUTTER_WRAP_CENTER = AssistKind(
     'dart.assist.flutter.wrap.center',
-    28,
+    DartAssistKindPriority.FLUTTER_WRAP_SPECIFIC,
     'Wrap with Center',
   );
   static const FLUTTER_WRAP_COLUMN = AssistKind(
     'dart.assist.flutter.wrap.column',
-    28,
+    DartAssistKindPriority.FLUTTER_WRAP_SPECIFIC,
     'Wrap with Column',
   );
   static const FLUTTER_WRAP_CONTAINER = AssistKind(
     'dart.assist.flutter.wrap.container',
-    28,
+    DartAssistKindPriority.FLUTTER_WRAP_SPECIFIC,
     'Wrap with Container',
   );
   static const FLUTTER_WRAP_PADDING = AssistKind(
     'dart.assist.flutter.wrap.padding',
-    28,
+    DartAssistKindPriority.FLUTTER_WRAP_SPECIFIC,
     'Wrap with Padding',
   );
   static const FLUTTER_WRAP_ROW = AssistKind(
     'dart.assist.flutter.wrap.row',
-    28,
+    DartAssistKindPriority.FLUTTER_WRAP_SPECIFIC,
     'Wrap with Row',
   );
   static const FLUTTER_WRAP_SIZED_BOX = AssistKind(
     'dart.assist.flutter.wrap.sizedBox',
-    28,
+    DartAssistKindPriority.FLUTTER_WRAP_SPECIFIC,
     'Wrap with SizedBox',
   );
   static const FLUTTER_WRAP_STREAM_BUILDER = AssistKind(
     'dart.assist.flutter.wrap.streamBuilder',
-    28,
+    DartAssistKindPriority.FLUTTER_WRAP_SPECIFIC,
     'Wrap with StreamBuilder',
   );
-
-  // Flutter re-order assists
   static const FLUTTER_SWAP_WITH_CHILD = AssistKind(
     'dart.assist.flutter.swap.withChild',
-    27,
+    DartAssistKindPriority.FLUTTER_SWAP,
     'Swap with child',
   );
   static const FLUTTER_SWAP_WITH_PARENT = AssistKind(
     'dart.assist.flutter.swap.withParent',
-    27,
+    DartAssistKindPriority.FLUTTER_SWAP,
     'Swap with parent',
   );
   static const FLUTTER_MOVE_DOWN = AssistKind(
     'dart.assist.flutter.move.down',
-    26,
+    DartAssistKindPriority.FLUTTER_MOVE,
     'Move widget down',
   );
   static const FLUTTER_MOVE_UP = AssistKind(
     'dart.assist.flutter.move.up',
-    26,
+    DartAssistKindPriority.FLUTTER_MOVE,
     'Move widget up',
   );
-
-  // Flutter remove assist
   static const FLUTTER_REMOVE_WIDGET = AssistKind(
     'dart.assist.flutter.removeWidget',
-    25,
+    DartAssistKindPriority.FLUTTER_REMOVE,
     'Remove this widget',
   );
-
   static const IMPORT_ADD_SHOW = AssistKind(
     'dart.assist.add.showCombinator',
-    30,
+    DartAssistKindPriority.DEFAULT,
     "Add explicit 'show' combinator",
   );
   static const INLINE_INVOCATION = AssistKind(
     'dart.assist.inline',
-    30,
+    DartAssistKindPriority.DEFAULT,
     "Inline invocation of '{0}'",
   );
   static const INTRODUCE_LOCAL_CAST_TYPE = AssistKind(
     'dart.assist.introduceLocalCast',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Introduce new local with tested type',
   );
   static const INVERT_IF_STATEMENT = AssistKind(
     'dart.assist.invertIf',
-    30,
+    DartAssistKindPriority.DEFAULT,
     "Invert 'if' statement",
   );
   static const JOIN_IF_WITH_INNER = AssistKind(
     'dart.assist.joinWithInnerIf',
-    30,
+    DartAssistKindPriority.DEFAULT,
     "Join 'if' statement with inner 'if' statement",
   );
   static const JOIN_IF_WITH_OUTER = AssistKind(
     'dart.assist.joinWithOuterIf',
-    30,
+    DartAssistKindPriority.DEFAULT,
     "Join 'if' statement with outer 'if' statement",
   );
   static const JOIN_VARIABLE_DECLARATION = AssistKind(
     'dart.assist.joinVariableDeclaration',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Join variable declaration',
   );
   static const REMOVE_TYPE_ANNOTATION = AssistKind(
     // todo (pq): unify w/ fix
     'dart.assist.remove.typeAnnotation',
-    31,
+    DartAssistKindPriority.PRIORITY,
     'Remove type annotation',
   );
   static const REPLACE_CONDITIONAL_WITH_IF_ELSE = AssistKind(
     'dart.assist.convert.conditionalToIfElse',
-    30,
+    DartAssistKindPriority.DEFAULT,
     "Replace conditional with 'if-else'",
   );
   static const REPLACE_IF_ELSE_WITH_CONDITIONAL = AssistKind(
     'dart.assist.convert.ifElseToConditional',
-    30,
+    DartAssistKindPriority.DEFAULT,
     "Replace 'if-else' with conditional ('c ? x : y')",
   );
   static const REPLACE_WITH_VAR = AssistKind(
     'dart.assist.replace.withVar',
-    30,
+    DartAssistKindPriority.DEFAULT,
     "Replace type annotation with 'var'",
   );
   static const SHADOW_FIELD = AssistKind(
     'dart.assist.shadowField',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Create a local variable that shadows the field',
   );
   static const SORT_CHILD_PROPERTY_LAST = AssistKind(
     'dart.assist.sort.child.properties.last',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Move child property to end of arguments',
   );
   static const SPLIT_AND_CONDITION = AssistKind(
     'dart.assist.splitIfConjunction',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Split && condition',
   );
   static const SPLIT_VARIABLE_DECLARATION = AssistKind(
     'dart.assist.splitVariableDeclaration',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Split variable declaration',
   );
   static const SURROUND_WITH_BLOCK = AssistKind(
     'dart.assist.surround.block',
-    38,
+    DartAssistKindPriority.SURROUND_WITH_BLOCK,
     'Surround with block',
   );
   static const SURROUND_WITH_DO_WHILE = AssistKind(
     'dart.assist.surround.doWhile',
-    33,
+    DartAssistKindPriority.SURROUND_WITH_DO_WHILE,
     "Surround with 'do-while'",
   );
   static const SURROUND_WITH_FOR = AssistKind(
     'dart.assist.surround.forEach',
-    34,
+    DartAssistKindPriority.SURROUND_WITH_FOR,
     "Surround with 'for'",
   );
   static const SURROUND_WITH_FOR_IN = AssistKind(
     'dart.assist.surround.forIn',
-    35,
+    DartAssistKindPriority.SURROUND_WITH_FOR_IN,
     "Surround with 'for-in'",
   );
   static const SURROUND_WITH_IF = AssistKind(
     'dart.assist.surround.if',
-    37,
+    DartAssistKindPriority.SURROUND_WITH_IF,
     "Surround with 'if'",
   );
   static const SURROUND_WITH_SET_STATE = AssistKind(
     'dart.assist.surround.setState',
-    33,
+    DartAssistKindPriority.SURROUND_WITH_SET_STATE,
     "Surround with 'setState'",
   );
   static const SURROUND_WITH_TRY_CATCH = AssistKind(
     'dart.assist.surround.tryCatch',
-    32,
+    DartAssistKindPriority.SURROUND_WITH_TRY_CATCH,
     "Surround with 'try-catch'",
   );
   static const SURROUND_WITH_TRY_FINALLY = AssistKind(
     'dart.assist.surround.tryFinally',
-    31,
+    DartAssistKindPriority.SURROUND_WITH_TRY_FINALLY,
     "Surround with 'try-finally'",
   );
   static const SURROUND_WITH_WHILE = AssistKind(
     'dart.assist.surround.while',
-    36,
+    DartAssistKindPriority.SURROUND_WITH_WHILE,
     "Surround with 'while'",
   );
   static const USE_CURLY_BRACES = AssistKind(
     'dart.assist.surround.curlyBraces',
-    30,
+    DartAssistKindPriority.DEFAULT,
     'Use curly braces',
   );
 }
+
+/// The priorities associated with various groups of assists.
+class DartAssistKindPriority {
+  static const int FLUTTER_REMOVE = 25;
+  static const int FLUTTER_MOVE = 26;
+  static const int FLUTTER_SWAP = 27;
+  static const int FLUTTER_WRAP_SPECIFIC = 28;
+  static const int FLUTTER_WRAP_GENERAL = 29;
+  static const int DEFAULT = 30;
+  static const int PRIORITY = 31;
+  static const int SURROUND_WITH_TRY_FINALLY = 31;
+  static const int SURROUND_WITH_TRY_CATCH = 32;
+  static const int SURROUND_WITH_DO_WHILE = 33;
+  static const int SURROUND_WITH_SET_STATE = 33;
+  static const int SURROUND_WITH_FOR = 34;
+  static const int SURROUND_WITH_FOR_IN = 35;
+  static const int SURROUND_WITH_WHILE = 36;
+  static const int SURROUND_WITH_IF = 37;
+  static const int SURROUND_WITH_BLOCK = 38;
+}
diff --git a/pkg/analyzer/lib/dart/element/visitor.dart b/pkg/analyzer/lib/dart/element/visitor.dart
index 86e4839..3e64e10 100644
--- a/pkg/analyzer/lib/dart/element/visitor.dart
+++ b/pkg/analyzer/lib/dart/element/visitor.dart
@@ -431,7 +431,12 @@
   R? visitParameterElement(ParameterElement element) => null;
 
   @override
-  R? visitPartElement(PartElement element) => null;
+  R? visitPartElement(PartElement element) {
+    if (element is PartElementWithPart) {
+      visitCompilationUnitElement(element.includedUnit);
+    }
+    return null;
+  }
 
   @override
   R? visitPrefixElement(PrefixElement element) => null;
diff --git a/tools/VERSION b/tools/VERSION
index c439ee5b..f56bb6c 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 18
 PATCH 0
-PRERELEASE 267
+PRERELEASE 268
 PRERELEASE_PATCH 0
\ No newline at end of file