| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.plugin.edit.fix.fix_dart; | 5 library analysis_server.plugin.edit.fix.fix_dart; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/plugin/edit/fix/fix_core.dart'; | 9 import 'package:analysis_server/plugin/edit/fix/fix_core.dart'; |
| 10 import 'package:analysis_server/src/services/correction/fix_internal.dart' | 10 import 'package:analysis_server/src/services/correction/fix_internal.dart' |
| 11 show DartFixContextImpl; | 11 show DartFixContextImpl; |
| 12 import 'package:analyzer/src/generated/ast.dart'; | 12 import 'package:analyzer/src/generated/ast.dart'; |
| 13 import 'package:analyzer/src/generated/engine.dart'; | 13 import 'package:analyzer/src/generated/engine.dart'; |
| 14 import 'package:analyzer/src/generated/source.dart'; | 14 import 'package:analyzer/src/generated/source.dart'; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * An object used to provide context information for [DartFixContributor]s. | 17 * An object used to provide context information for [DartFixContributor]s. |
| 18 * | 18 * |
| 19 * Clients may not extend, implement or mix-in this class. | 19 * Clients may not extend, implement or mix-in this class. |
| 20 */ | 20 */ |
| 21 abstract class DartFixContext extends FixContext { | 21 abstract class DartFixContext implements FixContext { |
| 22 /** | 22 /** |
| 23 * The [CompilationUnit] to compute fixes in. | 23 * The [CompilationUnit] to compute fixes in. |
| 24 */ | 24 */ |
| 25 CompilationUnit get unit; | 25 CompilationUnit get unit; |
| 26 } | 26 } |
| 27 | 27 |
| 28 /** | 28 /** |
| 29 * A [FixContributor] that can be used to contribute fixes for errors in Dart | 29 * A [FixContributor] that can be used to contribute fixes for errors in Dart |
| 30 * files. | 30 * files. |
| 31 * | 31 * |
| (...skipping 18 matching lines...) Expand all Loading... |
| 50 } | 50 } |
| 51 DartFixContext dartContext = new DartFixContextImpl(context, unit); | 51 DartFixContext dartContext = new DartFixContextImpl(context, unit); |
| 52 return internalComputeFixes(dartContext); | 52 return internalComputeFixes(dartContext); |
| 53 } | 53 } |
| 54 | 54 |
| 55 /** | 55 /** |
| 56 * Return a list of fixes for the given [context]. | 56 * Return a list of fixes for the given [context]. |
| 57 */ | 57 */ |
| 58 Future<List<Fix>> internalComputeFixes(DartFixContext context); | 58 Future<List<Fix>> internalComputeFixes(DartFixContext context); |
| 59 } | 59 } |
| OLD | NEW |