| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   118   @override |   118   @override | 
|   119   List<RefactoringMethodParameter> get parameters => _parameters; |   119   List<RefactoringMethodParameter> get parameters => _parameters; | 
|   120  |   120  | 
|   121   @override |   121   @override | 
|   122   void set parameters(List<RefactoringMethodParameter> parameters) { |   122   void set parameters(List<RefactoringMethodParameter> parameters) { | 
|   123     _parameters = parameters.toList(); |   123     _parameters = parameters.toList(); | 
|   124   } |   124   } | 
|   125  |   125  | 
|   126   @override |   126   @override | 
|   127   String get refactoringName { |   127   String get refactoringName { | 
|   128     AstNode node = new NodeLocator.con1(selectionOffset).searchWithin(unit); |   128     AstNode node = new NodeLocator(selectionOffset).searchWithin(unit); | 
|   129     if (node != null && |   129     if (node != null && | 
|   130         node.getAncestor((node) => node is ClassDeclaration) != null) { |   130         node.getAncestor((node) => node is ClassDeclaration) != null) { | 
|   131       return 'Extract Method'; |   131       return 'Extract Method'; | 
|   132     } |   132     } | 
|   133     return 'Extract Function'; |   133     return 'Extract Function'; | 
|   134   } |   134   } | 
|   135  |   135  | 
|   136   String get signature { |   136   String get signature { | 
|   137     StringBuffer sb = new StringBuffer(); |   137     StringBuffer sb = new StringBuffer(); | 
|   138     if (createGetter) { |   138     if (createGetter) { | 
| (...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1201       return false; |  1201       return false; | 
|  1202     } |  1202     } | 
|  1203     for (int i = 0; i < parameterTypes.length; i++) { |  1203     for (int i = 0; i < parameterTypes.length; i++) { | 
|  1204       if (other.parameterTypes[i] != parameterTypes[i]) { |  1204       if (other.parameterTypes[i] != parameterTypes[i]) { | 
|  1205         return false; |  1205         return false; | 
|  1206       } |  1206       } | 
|  1207     } |  1207     } | 
|  1208     return true; |  1208     return true; | 
|  1209   } |  1209   } | 
|  1210 } |  1210 } | 
| OLD | NEW |