Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Side by Side Diff: pkg/analysis_server/lib/src/services/refactoring/extract_method.dart

Issue 2317113005: Remove StringUtils from java_core. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 return null; 43 return null;
44 } 44 }
45 45
46 /** 46 /**
47 * Returns the "normalized" version of the given source, which is reconstructed 47 * Returns the "normalized" version of the given source, which is reconstructed
48 * from tokens, so ignores all the comments and spaces. 48 * from tokens, so ignores all the comments and spaces.
49 */ 49 */
50 String _getNormalizedSource(String src) { 50 String _getNormalizedSource(String src) {
51 List<Token> selectionTokens = TokenUtils.getTokens(src); 51 List<Token> selectionTokens = TokenUtils.getTokens(src);
52 return StringUtils.join(selectionTokens, _TOKEN_SEPARATOR); 52 return selectionTokens.join(_TOKEN_SEPARATOR);
53 } 53 }
54 54
55 /** 55 /**
56 * Returns the [Map] which maps [map] values to their keys. 56 * Returns the [Map] which maps [map] values to their keys.
57 */ 57 */
58 Map<String, String> _inverseMap(Map<String, String> map) { 58 Map<String, String> _inverseMap(Map<String, String> map) {
59 Map<String, String> result = <String, String>{}; 59 Map<String, String> result = <String, String>{};
60 map.forEach((String key, String value) { 60 map.forEach((String key, String value) {
61 result[value] = key; 61 result[value] = key;
62 }); 62 });
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 return false; 1242 return false;
1243 } 1243 }
1244 for (int i = 0; i < parameterTypes.length; i++) { 1244 for (int i = 0; i < parameterTypes.length; i++) {
1245 if (other.parameterTypes[i] != parameterTypes[i]) { 1245 if (other.parameterTypes[i] != parameterTypes[i]) {
1246 return false; 1246 return false;
1247 } 1247 }
1248 } 1248 }
1249 return true; 1249 return true;
1250 } 1250 }
1251 } 1251 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | pkg/analyzer/lib/src/generated/java_core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698