OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library analysis_server.src.services.correction.fix; | 5 library analysis_server.src.services.correction.fix; |
6 | 6 |
7 import 'package:analysis_server/edit/fix/fix_core.dart'; | 7 import 'package:analysis_server/edit/fix/fix_core.dart'; |
8 import 'package:analysis_server/src/plugin/server_plugin.dart'; | 8 import 'package:analysis_server/src/plugin/server_plugin.dart'; |
9 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
10 import 'package:analyzer/src/generated/error.dart'; | 10 import 'package:analyzer/src/generated/error.dart'; |
(...skipping 25 matching lines...) Expand all Loading... |
36 } | 36 } |
37 | 37 |
38 /** | 38 /** |
39 * An enumeration of possible quick fix kinds. | 39 * An enumeration of possible quick fix kinds. |
40 */ | 40 */ |
41 class DartFixKind { | 41 class DartFixKind { |
42 static const ADD_ASYNC = | 42 static const ADD_ASYNC = |
43 const FixKind('ADD_ASYNC', 50, "Add 'async' modifier"); | 43 const FixKind('ADD_ASYNC', 50, "Add 'async' modifier"); |
44 static const ADD_FIELD_FORMAL_PARAMETERS = const FixKind( | 44 static const ADD_FIELD_FORMAL_PARAMETERS = const FixKind( |
45 'ADD_FIELD_FORMAL_PARAMETERS', 30, "Add final field formal parameters"); | 45 'ADD_FIELD_FORMAL_PARAMETERS', 30, "Add final field formal parameters"); |
| 46 static const ADD_MISSING_PARAMETER_POSITIONAL = const FixKind( |
| 47 'ADD_MISSING_PARAMETER_POSITIONAL', 31, |
| 48 "Add optional positional parameter"); |
| 49 static const ADD_MISSING_PARAMETER_REQUIRED = const FixKind( |
| 50 'ADD_MISSING_PARAMETER_REQUIRED', 30, "Add required parameter"); |
46 static const ADD_PACKAGE_DEPENDENCY = const FixKind( | 51 static const ADD_PACKAGE_DEPENDENCY = const FixKind( |
47 'ADD_PACKAGE_DEPENDENCY', 50, "Add dependency on package '{0}'"); | 52 'ADD_PACKAGE_DEPENDENCY', 50, "Add dependency on package '{0}'"); |
48 static const ADD_PART_OF = | 53 static const ADD_PART_OF = |
49 const FixKind('ADD_PART_OF', 50, "Add 'part of' directive"); | 54 const FixKind('ADD_PART_OF', 50, "Add 'part of' directive"); |
50 static const ADD_SUPER_CONSTRUCTOR_INVOCATION = const FixKind( | 55 static const ADD_SUPER_CONSTRUCTOR_INVOCATION = const FixKind( |
51 'ADD_SUPER_CONSTRUCTOR_INVOCATION', 50, | 56 'ADD_SUPER_CONSTRUCTOR_INVOCATION', 50, |
52 "Add super constructor {0} invocation"); | 57 "Add super constructor {0} invocation"); |
53 static const CHANGE_TO = const FixKind('CHANGE_TO', 49, "Change to '{0}'"); | 58 static const CHANGE_TO = const FixKind('CHANGE_TO', 49, "Change to '{0}'"); |
54 static const CHANGE_TO_STATIC_ACCESS = const FixKind( | 59 static const CHANGE_TO_STATIC_ACCESS = const FixKind( |
55 'CHANGE_TO_STATIC_ACCESS', 50, "Change access to static using '{0}'"); | 60 'CHANGE_TO_STATIC_ACCESS', 50, "Change access to static using '{0}'"); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 "Return 'Future' from 'async' function"); | 122 "Return 'Future' from 'async' function"); |
118 static const USE_CONST = const FixKind('USE_CONST', 50, "Change to constant"); | 123 static const USE_CONST = const FixKind('USE_CONST', 50, "Change to constant"); |
119 static const USE_EFFECTIVE_INTEGER_DIVISION = const FixKind( | 124 static const USE_EFFECTIVE_INTEGER_DIVISION = const FixKind( |
120 'USE_EFFECTIVE_INTEGER_DIVISION', 50, | 125 'USE_EFFECTIVE_INTEGER_DIVISION', 50, |
121 "Use effective integer division ~/"); | 126 "Use effective integer division ~/"); |
122 static const USE_EQ_EQ_NULL = | 127 static const USE_EQ_EQ_NULL = |
123 const FixKind('USE_EQ_EQ_NULL', 50, "Use == null instead of 'is Null'"); | 128 const FixKind('USE_EQ_EQ_NULL', 50, "Use == null instead of 'is Null'"); |
124 static const USE_NOT_EQ_NULL = | 129 static const USE_NOT_EQ_NULL = |
125 const FixKind('USE_NOT_EQ_NULL', 50, "Use != null instead of 'is! Null'"); | 130 const FixKind('USE_NOT_EQ_NULL', 50, "Use != null instead of 'is! Null'"); |
126 } | 131 } |
OLD | NEW |