| 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 edit.domain; | 5 library edit.domain; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/edit/assist/assist_core.dart'; | 9 import 'package:analysis_server/edit/assist/assist_core.dart'; |
| 10 import 'package:analysis_server/edit/fix/fix_core.dart'; | 10 import 'package:analysis_server/edit/fix/fix_core.dart'; |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 refactoring = new ExtractLocalRefactoring(units[0], offset, length); | 482 refactoring = new ExtractLocalRefactoring(units[0], offset, length); |
| 483 feedback = new ExtractLocalVariableFeedback([], [], []); | 483 feedback = new ExtractLocalVariableFeedback([], [], []); |
| 484 } | 484 } |
| 485 } | 485 } |
| 486 if (kind == RefactoringKind.EXTRACT_METHOD) { | 486 if (kind == RefactoringKind.EXTRACT_METHOD) { |
| 487 List<CompilationUnit> units = server.getResolvedCompilationUnits(file); | 487 List<CompilationUnit> units = server.getResolvedCompilationUnits(file); |
| 488 if (units.isNotEmpty) { | 488 if (units.isNotEmpty) { |
| 489 refactoring = new ExtractMethodRefactoring( | 489 refactoring = new ExtractMethodRefactoring( |
| 490 searchEngine, units[0], offset, length); | 490 searchEngine, units[0], offset, length); |
| 491 feedback = new ExtractMethodFeedback( | 491 feedback = new ExtractMethodFeedback( |
| 492 offset, length, null, [], false, [], [], []); | 492 offset, length, '', [], false, [], [], []); |
| 493 } | 493 } |
| 494 } | 494 } |
| 495 if (kind == RefactoringKind.INLINE_LOCAL_VARIABLE) { | 495 if (kind == RefactoringKind.INLINE_LOCAL_VARIABLE) { |
| 496 List<CompilationUnit> units = server.getResolvedCompilationUnits(file); | 496 List<CompilationUnit> units = server.getResolvedCompilationUnits(file); |
| 497 if (units.isNotEmpty) { | 497 if (units.isNotEmpty) { |
| 498 refactoring = | 498 refactoring = |
| 499 new InlineLocalRefactoring(searchEngine, units[0], offset); | 499 new InlineLocalRefactoring(searchEngine, units[0], offset); |
| 500 } | 500 } |
| 501 } | 501 } |
| 502 if (kind == RefactoringKind.INLINE_METHOD) { | 502 if (kind == RefactoringKind.INLINE_METHOD) { |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 } | 645 } |
| 646 if (refactoring is RenameRefactoring) { | 646 if (refactoring is RenameRefactoring) { |
| 647 RenameRefactoring renameRefactoring = refactoring; | 647 RenameRefactoring renameRefactoring = refactoring; |
| 648 RenameOptions renameOptions = params.options; | 648 RenameOptions renameOptions = params.options; |
| 649 renameRefactoring.newName = renameOptions.newName; | 649 renameRefactoring.newName = renameOptions.newName; |
| 650 return renameRefactoring.checkNewName(); | 650 return renameRefactoring.checkNewName(); |
| 651 } | 651 } |
| 652 return new RefactoringStatus(); | 652 return new RefactoringStatus(); |
| 653 } | 653 } |
| 654 } | 654 } |
| OLD | NEW |