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

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

Issue 1310263003: Reformat code to minimize churn (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
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));
}
}

Powered by Google App Engine
This is Rietveld 408576698