Index: pkg/analysis_server/lib/src/services/refactoring/extract_local.dart |
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart |
index 3acc98241340899527e2ad4d8941459931ee1c6c..6cfd951cdab52349cfbd65a31fd2007428b92682 100644 |
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart |
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart |
@@ -150,9 +150,11 @@ class ExtractLocalRefactoringImpl extends RefactoringImpl |
String declStatement = prefix + indent + declarationSource + eol; |
String exprStatement = prefix + indent + 'return '; |
Expression expr = target.expression; |
- doSourceChange_addElementEdit(change, unitElement, new SourceEdit( |
- target.offset, expr.offset - target.offset, |
- '{' + eol + declStatement + exprStatement)); |
+ doSourceChange_addElementEdit( |
+ change, |
+ unitElement, |
+ new SourceEdit(target.offset, expr.offset - target.offset, |
+ '{' + eol + declStatement + exprStatement)); |
doSourceChange_addElementEdit(change, unitElement, |
new SourceEdit(expr.end, 0, ';' + eol + prefix + '}')); |
} |
@@ -378,7 +380,8 @@ class ExtractLocalRefactoringImpl extends RefactoringImpl |
stringLiteralPart, excludedVariableNames)); |
} else if (singleExpression != null) { |
names.addAll(getVariableNameSuggestionsForExpression( |
- singleExpression.staticType, singleExpression, |
+ singleExpression.staticType, |
+ singleExpression, |
excludedVariableNames)); |
} |
} |