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

Unified Diff: pkg/analysis_server/lib/src/services/refactoring/inline_local.dart

Issue 628293004: Remove references to Engine classes from protocol.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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
Index: pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
diff --git a/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart b/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
index 1e32117d6ee4c4b7fd2374271933849fb1577047..f44274d030f8eafa6f1a4f76f55377a45c9e2f24 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
@@ -6,7 +6,7 @@ library services.src.refactoring.inline_local;
import 'dart:async';
-import 'package:analysis_server/src/protocol.dart' hide Element;
+import 'package:analysis_server/src/protocol_server.dart' hide Element;
import 'package:analysis_server/src/services/correction/status.dart';
import 'package:analysis_server/src/services/correction/util.dart';
import 'package:analysis_server/src/services/refactoring/refactoring.dart';
@@ -98,7 +98,7 @@ class InlineLocalRefactoringImpl extends RefactoringImpl implements
"Local variable '{0}' is not initialized at declaration.",
_variableElement.displayName);
result =
- new RefactoringStatus.fatal(message, new Location.fromNode(_variableNode));
+ new RefactoringStatus.fatal(message, newLocation_fromNode(_variableNode));
return new Future.value(result);
}
// prepare references
@@ -112,7 +112,7 @@ class InlineLocalRefactoringImpl extends RefactoringImpl implements
[_variableElement.displayName]);
return new RefactoringStatus.fatal(
message,
- new Location.fromMatch(reference));
+ newLocation_fromMatch(reference));
}
}
// done
@@ -128,7 +128,10 @@ class InlineLocalRefactoringImpl extends RefactoringImpl implements
Statement declarationStatement =
_variableNode.getAncestor((node) => node is VariableDeclarationStatement);
SourceRange range = utils.getLinesRangeStatements([declarationStatement]);
- change.addElementEdit(unitElement, new SourceEdit.range(range, ''));
+ doSourceChange_addElementEdit(
+ change,
+ unitElement,
+ newSourceEdit_range(range, ''));
}
// prepare initializer
Expression initializer = _variableNode.initializer;
@@ -139,9 +142,10 @@ class InlineLocalRefactoringImpl extends RefactoringImpl implements
SourceRange range = reference.sourceRange;
String sourceForReference =
_getSourceForReference(range, initializerSource, initializerPrecedence);
- change.addElementEdit(
+ doSourceChange_addElementEdit(
+ change,
unitElement,
- new SourceEdit.range(range, sourceForReference));
+ newSourceEdit_range(range, sourceForReference));
}
// done
return new Future.value(change);

Powered by Google App Engine
This is Rietveld 408576698