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

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

Issue 1165943003: Tweak ADD_PART_OF quick fix to support both new/old task models. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9dc36d0c0caf99febf76ca74f186ab79bcefc6f8..cb695b8422aa497a16d42a805f9c1250492e78c1 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -413,8 +413,12 @@ class FixProcessor {
if (node is SimpleStringLiteral && node.parent is PartDirective) {
PartDirective directive = node.parent;
Source partSource = directive.source;
- CompilationUnit partUnit =
- context.getResolvedCompilationUnit2(partSource, unitSource);
+ CompilationUnit partUnit;
+ if (AnalysisEngine.instance.useTaskModel) {
+ partUnit = context.getResolvedCompilationUnit2(partSource, partSource);
+ } else {
+ partUnit = context.getResolvedCompilationUnit2(partSource, unitSource);
+ }
if (partUnit != null) {
CorrectionUtils partUtils = new CorrectionUtils(partUnit);
CorrectionUtils_InsertDesc desc = partUtils.getInsertDescTop();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698