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

Unified Diff: pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart

Issue 2953093002: Update the plugin API (Closed)
Patch Set: Update FixesRequest Created 3 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
Index: pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart
diff --git a/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart b/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart
index 92584f8ff67f95e927c7c186d5518d10dcfa9e69..408587fd38a00cc31464fa38614fb14f1d52856f 100644
--- a/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart
+++ b/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart
@@ -4,9 +4,9 @@
import 'dart:async';
+import 'package:analyzer/dart/analysis/results.dart';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/source/package_map_resolver.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer_plugin/protocol/protocol_common.dart';
import 'package:analyzer_plugin/src/utilities/completion/completion_core.dart';
@@ -32,7 +32,7 @@ abstract class DartCompletionContributorTest extends AbstractContextTest {
int replacementOffset;
int replacementLength;
CompletionContributor contributor;
- CompletionRequest request;
+ DartCompletionRequest request;
List<CompletionSuggestion> suggestions;
/**
@@ -455,10 +455,9 @@ abstract class DartCompletionContributorTest extends AbstractContextTest {
}
Future computeSuggestions() async {
- AnalysisResult analysisResult = await driver.getResult(testFile);
- testSource = analysisResult.unit.element.source;
- request =
- new CompletionRequestImpl(provider, analysisResult, completionOffset);
+ ResolveResult result = await driver.getResult(testFile);
+ testSource = result.unit.element.source;
+ request = new DartCompletionRequestImpl(provider, completionOffset, result);
CompletionTarget target =
new CompletionTarget.forOffset(request.result.unit, request.offset);
« no previous file with comments | « pkg/analyzer_plugin/test/plugin/navigation_mixin_test.dart ('k') | pkg/analyzer_plugin/test/utilities/navigation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698