| 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 services.correction.fix; | 5 library services.correction.fix; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/protocol.dart' show SourceChange; | 7 import 'package:analysis_server/src/protocol.dart' show SourceChange; |
| 8 import 'package:analysis_server/src/services/correction/fix_internal.dart'; | 8 import 'package:analysis_server/src/services/correction/fix_internal.dart'; |
| 9 import 'package:analysis_server/src/services/search/search_engine.dart'; | 9 import 'package:analysis_server/src/services/search/search_engine.dart'; |
| 10 import 'package:analyzer/src/generated/ast.dart'; | 10 import 'package:analyzer/src/generated/ast.dart'; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 String toString() { | 40 String toString() { |
| 41 return '[kind=$kind, change=$change]'; | 41 return '[kind=$kind, change=$change]'; |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 | 44 |
| 45 | 45 |
| 46 /** | 46 /** |
| 47 * An enumeration of possible quick fix kinds. | 47 * An enumeration of possible quick fix kinds. |
| 48 */ | 48 */ |
| 49 class FixKind { | 49 class FixKind { |
| 50 static const ADD_ASYNC = |
| 51 const FixKind('ADD_ASYNC', 50, "Add 'async' modifier"); |
| 50 static const ADD_PACKAGE_DEPENDENCY = | 52 static const ADD_PACKAGE_DEPENDENCY = |
| 51 const FixKind('ADD_PACKAGE_DEPENDENCY', 50, "Add dependency on package '{0
}'"); | 53 const FixKind('ADD_PACKAGE_DEPENDENCY', 50, "Add dependency on package '{0
}'"); |
| 52 static const ADD_SUPER_CONSTRUCTOR_INVOCATION = const FixKind( | 54 static const ADD_SUPER_CONSTRUCTOR_INVOCATION = const FixKind( |
| 53 'ADD_SUPER_CONSTRUCTOR_INVOCATION', | 55 'ADD_SUPER_CONSTRUCTOR_INVOCATION', |
| 54 50, | 56 50, |
| 55 "Add super constructor {0} invocation"); | 57 "Add super constructor {0} invocation"); |
| 56 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}'"); |
| 57 static const CHANGE_TO_STATIC_ACCESS = const FixKind( | 59 static const CHANGE_TO_STATIC_ACCESS = const FixKind( |
| 58 'CHANGE_TO_STATIC_ACCESS', | 60 'CHANGE_TO_STATIC_ACCESS', |
| 59 50, | 61 50, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 132 |
| 131 final name; | 133 final name; |
| 132 final int relevance; | 134 final int relevance; |
| 133 final String message; | 135 final String message; |
| 134 | 136 |
| 135 const FixKind(this.name, this.relevance, this.message); | 137 const FixKind(this.name, this.relevance, this.message); |
| 136 | 138 |
| 137 @override | 139 @override |
| 138 String toString() => name; | 140 String toString() => name; |
| 139 } | 141 } |
| OLD | NEW |