| 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.src.refactoring.extract_method; | 5 library services.src.refactoring.extract_method; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/protocol_server.dart' hide Element; | 9 import 'package:analysis_server/src/protocol_server.dart' hide Element; |
| 10 import 'package:analysis_server/src/services/correction/name_suggestion.dart'; | 10 import 'package:analysis_server/src/services/correction/name_suggestion.dart'; |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 | 558 |
| 559 String _getTypeCode(DartType type) { | 559 String _getTypeCode(DartType type) { |
| 560 return utils.getTypeSource(type, librariesToImport); | 560 return utils.getTypeSource(type, librariesToImport); |
| 561 } | 561 } |
| 562 | 562 |
| 563 void _initializeHasAwait() { | 563 void _initializeHasAwait() { |
| 564 _HasAwaitVisitor visitor = new _HasAwaitVisitor(); | 564 _HasAwaitVisitor visitor = new _HasAwaitVisitor(); |
| 565 if (_selectionExpression != null) { | 565 if (_selectionExpression != null) { |
| 566 _selectionExpression.accept(visitor); | 566 _selectionExpression.accept(visitor); |
| 567 } else if (_selectionStatements != null) { | 567 } else if (_selectionStatements != null) { |
| 568 _selectionStatements.forEach((statement) => statement.accept(visitor)); | 568 _selectionStatements.forEach((statement) { |
| 569 statement.accept(visitor); |
| 570 }); |
| 569 } | 571 } |
| 570 _hasAwait = visitor.result; | 572 _hasAwait = visitor.result; |
| 571 } | 573 } |
| 572 | 574 |
| 573 /** | 575 /** |
| 574 * Fills [_occurrences] field. | 576 * Fills [_occurrences] field. |
| 575 */ | 577 */ |
| 576 void _initializeOccurrences() { | 578 void _initializeOccurrences() { |
| 577 _occurrences.clear(); | 579 _occurrences.clear(); |
| 578 // prepare selection | 580 // prepare selection |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1240 return false; | 1242 return false; |
| 1241 } | 1243 } |
| 1242 for (int i = 0; i < parameterTypes.length; i++) { | 1244 for (int i = 0; i < parameterTypes.length; i++) { |
| 1243 if (other.parameterTypes[i] != parameterTypes[i]) { | 1245 if (other.parameterTypes[i] != parameterTypes[i]) { |
| 1244 return false; | 1246 return false; |
| 1245 } | 1247 } |
| 1246 } | 1248 } |
| 1247 return true; | 1249 return true; |
| 1248 } | 1250 } |
| 1249 } | 1251 } |
| OLD | NEW |