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

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

Issue 516673002: Tweaks for refactoring tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.dart' hide Element; 9 import 'package:analysis_server/src/protocol.dart' hide Element;
10 import 'package:analysis_server/src/services/correction/selection_analyzer.dart' ; 10 import 'package:analysis_server/src/services/correction/selection_analyzer.dart' ;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 158 }
159 // done 159 // done
160 return sb.toString(); 160 return sb.toString();
161 } 161 }
162 162
163 @override 163 @override
164 Future<RefactoringStatus> checkFinalConditions() { 164 Future<RefactoringStatus> checkFinalConditions() {
165 RefactoringStatus result = new RefactoringStatus(); 165 RefactoringStatus result = new RefactoringStatus();
166 result.addStatus(validateMethodName(name)); 166 result.addStatus(validateMethodName(name));
167 result.addStatus(_checkParameterNames()); 167 result.addStatus(_checkParameterNames());
168 // TODO: implement checkFinalConditions
169 return _checkPossibleConflicts().then((status) { 168 return _checkPossibleConflicts().then((status) {
170 result.addStatus(status); 169 result.addStatus(status);
171 return result; 170 return result;
172 }); 171 });
173 return new Future.value(result);
174 } 172 }
175 173
176 174
177 @override 175 @override
178 Future<RefactoringStatus> checkInitialConditions() { 176 Future<RefactoringStatus> checkInitialConditions() {
179 RefactoringStatus result = new RefactoringStatus(); 177 RefactoringStatus result = new RefactoringStatus();
180 // selection 178 // selection
181 result.addStatus(_checkSelection()); 179 result.addStatus(_checkSelection());
182 if (result.hasFatalError) { 180 if (result.hasFatalError) {
183 return new Future.value(result); 181 return new Future.value(result);
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 1048
1051 /** 1049 /**
1052 * Generalized version of some source, in which references to the specific 1050 * Generalized version of some source, in which references to the specific
1053 * variables are replaced with pattern variables, with back mapping from the 1051 * variables are replaced with pattern variables, with back mapping from the
1054 * pattern to the original variable names. 1052 * pattern to the original variable names.
1055 */ 1053 */
1056 class _SourcePattern { 1054 class _SourcePattern {
1057 String patternSource; 1055 String patternSource;
1058 Map<String, String> originalToPatternNames = {}; 1056 Map<String, String> originalToPatternNames = {};
1059 } 1057 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698