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

Unified Diff: pkg/analysis_server/lib/src/services/correction/fix_internal.dart

Issue 1375043004: Issue 24459. Fix for 'Create Method' QF in different unit. (Closed) Base URL: git@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/correction/fix_internal.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index a2dd7297276500d91702245226b2e9823338aa34..ba774a99ffbf17a48cb12eedc0edd43435943896 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -1869,6 +1869,11 @@ class FixProcessor {
sourcePrefix = eol;
}
sourceSuffix = eol;
+ // use different utils
+ CompilationUnitElement targetUnitElement =
+ getCompilationUnitElement(targetClassElement);
+ CompilationUnit targetUnit = getParsedUnit(targetUnitElement);
+ utils = new CorrectionUtils(targetUnit);
}
String targetFile = targetElement.source.fullName;
// build method source

Powered by Google App Engine
This is Rietveld 408576698