| 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'; |
| 11 import 'package:analyzer/src/generated/error.dart'; | 11 import 'package:analyzer/src/generated/error.dart'; |
| 12 import 'package:analyzer/src/generated/source.dart'; | |
| 13 | 12 |
| 14 | 13 |
| 15 /** | 14 /** |
| 16 * Computes [Fix]s for the given [AnalysisError]. | 15 * Computes [Fix]s for the given [AnalysisError]. |
| 17 * | 16 * |
| 18 * Returns the computed [Fix]s, not `null`. | 17 * Returns the computed [Fix]s, not `null`. |
| 19 */ | 18 */ |
| 20 List<Fix> computeFixes(SearchEngine searchEngine, CompilationUnit unit, | 19 List<Fix> computeFixes(SearchEngine searchEngine, CompilationUnit unit, |
| 21 AnalysisError error) { | 20 AnalysisError error) { |
| 22 var processor = new FixProcessor(searchEngine, unit, error); | 21 var processor = new FixProcessor(searchEngine, unit, error); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 120 |
| 122 final name; | 121 final name; |
| 123 final int relevance; | 122 final int relevance; |
| 124 final String message; | 123 final String message; |
| 125 | 124 |
| 126 const FixKind(this.name, this.relevance, this.message); | 125 const FixKind(this.name, this.relevance, this.message); |
| 127 | 126 |
| 128 @override | 127 @override |
| 129 String toString() => name; | 128 String toString() => name; |
| 130 } | 129 } |
| OLD | NEW |