| 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 27 matching lines...) Expand all Loading... |
| 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_PACKAGE_DEPENDENCY = const FixKind( | 46 static const ADD_PACKAGE_DEPENDENCY = const FixKind( |
| 47 'ADD_PACKAGE_DEPENDENCY', 50, "Add dependency on package '{0}'"); | 47 'ADD_PACKAGE_DEPENDENCY', 50, "Add dependency on package '{0}'"); |
| 48 static const ADD_PART_OF = |
| 49 const FixKind('ADD_PART_OF', 50, "Add 'part of' directive"); |
| 48 static const ADD_SUPER_CONSTRUCTOR_INVOCATION = const FixKind( | 50 static const ADD_SUPER_CONSTRUCTOR_INVOCATION = const FixKind( |
| 49 'ADD_SUPER_CONSTRUCTOR_INVOCATION', 50, | 51 'ADD_SUPER_CONSTRUCTOR_INVOCATION', 50, |
| 50 "Add super constructor {0} invocation"); | 52 "Add super constructor {0} invocation"); |
| 51 static const CHANGE_TO = const FixKind('CHANGE_TO', 49, "Change to '{0}'"); | 53 static const CHANGE_TO = const FixKind('CHANGE_TO', 49, "Change to '{0}'"); |
| 52 static const CHANGE_TO_STATIC_ACCESS = const FixKind( | 54 static const CHANGE_TO_STATIC_ACCESS = const FixKind( |
| 53 'CHANGE_TO_STATIC_ACCESS', 50, "Change access to static using '{0}'"); | 55 'CHANGE_TO_STATIC_ACCESS', 50, "Change access to static using '{0}'"); |
| 54 static const CREATE_CLASS = | 56 static const CREATE_CLASS = |
| 55 const FixKind('CREATE_CLASS', 50, "Create class '{0}'"); | 57 const FixKind('CREATE_CLASS', 50, "Create class '{0}'"); |
| 56 static const CREATE_CONSTRUCTOR = | 58 static const CREATE_CONSTRUCTOR = |
| 57 const FixKind('CREATE_CONSTRUCTOR', 50, "Create constructor '{0}'"); | 59 const FixKind('CREATE_CONSTRUCTOR', 50, "Create constructor '{0}'"); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 "Return 'Future' from 'async' function"); | 117 "Return 'Future' from 'async' function"); |
| 116 static const USE_CONST = const FixKind('USE_CONST', 50, "Change to constant"); | 118 static const USE_CONST = const FixKind('USE_CONST', 50, "Change to constant"); |
| 117 static const USE_EFFECTIVE_INTEGER_DIVISION = const FixKind( | 119 static const USE_EFFECTIVE_INTEGER_DIVISION = const FixKind( |
| 118 'USE_EFFECTIVE_INTEGER_DIVISION', 50, | 120 'USE_EFFECTIVE_INTEGER_DIVISION', 50, |
| 119 "Use effective integer division ~/"); | 121 "Use effective integer division ~/"); |
| 120 static const USE_EQ_EQ_NULL = | 122 static const USE_EQ_EQ_NULL = |
| 121 const FixKind('USE_EQ_EQ_NULL', 50, "Use == null instead of 'is Null'"); | 123 const FixKind('USE_EQ_EQ_NULL', 50, "Use == null instead of 'is Null'"); |
| 122 static const USE_NOT_EQ_NULL = | 124 static const USE_NOT_EQ_NULL = |
| 123 const FixKind('USE_NOT_EQ_NULL', 50, "Use != null instead of 'is! Null'"); | 125 const FixKind('USE_NOT_EQ_NULL', 50, "Use != null instead of 'is! Null'"); |
| 124 } | 126 } |
| OLD | NEW |