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

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

Issue 1159563004: Rename Element.node (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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_method.dart
diff --git a/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart b/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
index f3100efffe905af7bd27c6285b511d8a617c19cb..35ba073bc4c990e5b3036b54f613b0a32e48102d 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
@@ -50,8 +50,8 @@ String _getMethodSourceForInvocation(RefactoringStatus status, _SourcePart part,
List<Expression> arguments) {
// prepare edits to replace parameters with arguments
List<SourceEdit> edits = <SourceEdit>[];
- part._parameters.forEach(
- (ParameterElement parameter, List<_ParameterOccurrence> occurrences) {
+ part._parameters.forEach((ParameterElement parameter,
+ List<_ParameterOccurrence> occurrences) {
// prepare argument
Expression argument = null;
for (Expression arg in arguments) {
@@ -344,7 +344,7 @@ class InlineMethodRefactoringImpl extends RefactoringImpl
// class member
bool isClassMember = element.enclosingElement is ClassElement;
if (element is MethodElement || _isAccessor && isClassMember) {
- MethodDeclaration methodDeclaration = element.node;
+ MethodDeclaration methodDeclaration = element.computeNode();
_methodNode = methodDeclaration;
_methodParameters = methodDeclaration.parameters;
_methodBody = methodDeclaration.body;
@@ -357,7 +357,7 @@ class InlineMethodRefactoringImpl extends RefactoringImpl
// unit member
bool isUnitMember = element.enclosingElement is CompilationUnitElement;
if (element is FunctionElement || _isAccessor && isUnitMember) {
- FunctionDeclaration functionDeclaration = element.node;
+ FunctionDeclaration functionDeclaration = element.computeNode();
_methodNode = functionDeclaration;
_methodParameters = functionDeclaration.functionExpression.parameters;
_methodBody = functionDeclaration.functionExpression.body;

Powered by Google App Engine
This is Rietveld 408576698