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

Unified Diff: pkg/analysis_server/lib/src/edit/edit_domain.dart

Issue 880613004: Tweaks for refactoring manager. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/edit/edit_domain.dart
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index c611d3fa05f0402f5619d0fc61b65d45a984c310..22d01654654b05b5deb1e6f5fc899491154d5003 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -308,23 +308,27 @@ class _RefactoringManager {
await _init(params.kind, params.file, params.offset, params.length);
if (initStatus.hasFatalError) {
feedback = null;
- return _sendResultResponse();
+ _sendResultResponse();
+ return;
}
// set options
if (_requiresOptions) {
if (params.options == null) {
optionsStatus = new RefactoringStatus();
- return _sendResultResponse();
+ _sendResultResponse();
+ return;
}
optionsStatus = _setOptions(params);
if (_hasFatalError) {
- return _sendResultResponse();
+ _sendResultResponse();
+ return;
}
}
// done if just validation
if (params.validateOnly) {
finalStatus = new RefactoringStatus();
- return _sendResultResponse();
+ _sendResultResponse();
+ return;
}
// simulate an exception
if (test_simulateRefactoringException_final) {
@@ -333,7 +337,8 @@ class _RefactoringManager {
// validation and create change
finalStatus = await refactoring.checkFinalConditions();
if (_hasFatalError) {
- return _sendResultResponse();
+ _sendResultResponse();
+ return;
}
// simulate an exception
if (test_simulateRefactoringException_change) {
@@ -355,7 +360,7 @@ class _RefactoringManager {
* Initializes this context to perform a refactoring with the specified
* parameters. The existing [Refactoring] is reused or created as needed.
*/
- _init(RefactoringKind kind, String file,
+ Future _init(RefactoringKind kind, String file,
int offset, int length) async {
await server.onAnalysisComplete;
// check if we can continue with the existing Refactoring instance
@@ -363,7 +368,7 @@ class _RefactoringManager {
this.file == file &&
this.offset == offset &&
this.length == length) {
- return;
+ return null;
Paul Berry 2015/01/26 23:32:39 Aw, man, I didn't realize you would have to do thi
}
_reset();
this.kind = kind;
@@ -460,7 +465,7 @@ class _RefactoringManager {
if (refactoring == null) {
initStatus =
new RefactoringStatus.fatal('Unable to create a refactoring');
- return;
+ return null;
}
// check initial conditions
initStatus = await refactoring.checkInitialConditions();
@@ -504,6 +509,7 @@ class _RefactoringManager {
feedback.elementKindName = refactoring.elementKindName;
feedback.oldName = refactoring.oldName;
}
+ return null;
}
void _reset([engine.AnalysisContext context]) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698