| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library services.src.refactoring; | 8 library services.src.refactoring; |
| 9 | 9 |
| 10 import 'dart:async'; |
| 11 |
| 10 import 'package:analysis_services/correction/status.dart'; | 12 import 'package:analysis_services/correction/status.dart'; |
| 11 import 'package:analysis_services/refactoring/refactoring.dart'; | 13 import 'package:analysis_services/refactoring/refactoring.dart'; |
| 12 | 14 |
| 13 | 15 |
| 14 /** | 16 /** |
| 15 * Abstract implementation of {@link Refactoring}. | 17 * Abstract implementation of [Refactoring]. |
| 16 */ | 18 */ |
| 17 abstract class RefactoringImpl implements Refactoring { | 19 abstract class RefactoringImpl implements Refactoring { |
| 18 @override | 20 @override |
| 19 RefactoringStatus checkAllConditions() { | 21 Future<RefactoringStatus> checkAllConditions() { |
| 20 RefactoringStatus result = new RefactoringStatus(); | 22 RefactoringStatus result = new RefactoringStatus(); |
| 21 result.addStatus(checkInitialConditions()); | 23 return checkInitialConditions().then((status) { |
| 22 if (!result.hasFatalError) { | 24 result.addStatus(status); |
| 23 result.addStatus(checkFinalConditions()); | 25 if (result.hasFatalError) { |
| 24 } | 26 return result; |
| 25 return result; | 27 } |
| 28 return checkFinalConditions().then((status) { |
| 29 result.addStatus(status); |
| 30 return result; |
| 31 }); |
| 32 }); |
| 26 } | 33 } |
| 27 } | 34 } |
| OLD | NEW |