Index: pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart |
diff --git a/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart b/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart |
index 02b0a2d727e7916176e3638d53ff2f983596eec2..91a813f8214fd13445d3e5db5a79b522a096c6b1 100644 |
--- a/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart |
+++ b/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart |
@@ -9,6 +9,7 @@ import 'package:analyzer/file_system/file_system.dart'; |
import 'package:analyzer/src/dart/analysis/driver.dart'; |
import 'package:analyzer_plugin/protocol/protocol_common.dart' |
show SourceChange; |
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart'; |
/** |
* A description of a single proposed fix for some problem. |
@@ -27,7 +28,7 @@ class Fix { |
*/ |
static final Comparator<Fix> SORT_BY_RELEVANCE = |
(Fix firstFix, Fix secondFix) => |
- firstFix.kind.relevance - secondFix.kind.relevance; |
+ firstFix.kind.priority - secondFix.kind.priority; |
/** |
* A description of the fix being proposed. |
@@ -85,40 +86,3 @@ abstract class FixContributor { |
*/ |
Future<List<Fix>> computeFixes(FixContext context); |
} |
- |
-/** |
- * A description of a class of fixes. Instances are intended to hold the |
- * information that is common across a number of fixes and to be shared by those |
- * fixes. For example, if an unnecessary cast is found then one of the suggested |
- * fixes will be to remove the cast. If there are multiple unnecessary casts in |
- * a single file, then there will be multiple fixes, one per occurrence, but |
- * they will all share the same kind. |
- * |
- * Clients may not extend, implement or mix-in this class. |
- */ |
-class FixKind { |
- /** |
- * The name of this kind of fix, used for debugging. |
- */ |
- final String name; |
- |
- /** |
- * The relevance of this kind of fix for the kind of error being addressed. |
- */ |
- final int relevance; |
- |
- /** |
- * A human-readable description of the changes that will be applied by this |
- * kind of fix. |
- */ |
- final String message; |
- |
- /** |
- * Initialize a newly created kind of fix to have the given [name], |
- * [relevance] and [message]. |
- */ |
- const FixKind(this.name, this.relevance, this.message); |
- |
- @override |
- String toString() => name; |
-} |