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

Unified Diff: pkg/analysis_server/lib/src/domain_completion.dart

Issue 3001413002: Remove uses of the old plugin model from the analysis server (Closed)
Patch Set: Created 3 years, 4 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/domain_completion.dart
diff --git a/pkg/analysis_server/lib/src/domain_completion.dart b/pkg/analysis_server/lib/src/domain_completion.dart
index ae32957feb6936ef4c6ec10f9e42cc2b276fc6db..5e9f2a64b810719ae13227aead97e3c3e7e60e03 100644
--- a/pkg/analysis_server/lib/src/domain_completion.dart
+++ b/pkg/analysis_server/lib/src/domain_completion.dart
@@ -14,6 +14,7 @@ import 'package:analysis_server/src/plugin/plugin_manager.dart';
import 'package:analysis_server/src/provisional/completion/completion_core.dart';
import 'package:analysis_server/src/services/completion/completion_core.dart';
import 'package:analysis_server/src/services/completion/completion_performance.dart';
+import 'package:analysis_server/src/services/completion/dart/completion_manager.dart';
import 'package:analyzer/src/dart/analysis/driver.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
@@ -90,24 +91,19 @@ class CompletionDomainHandler extends AbstractRequestHandler {
//
List<CompletionSuggestion> suggestions = <CompletionSuggestion>[];
if (request.result != null) {
- Iterable<CompletionContributor> newContributors =
- server.serverPlugin.completionContributors;
-
const COMPUTE_SUGGESTIONS_TAG = 'computeSuggestions';
performance.logStartTime(COMPUTE_SUGGESTIONS_TAG);
- for (CompletionContributor contributor in newContributors) {
- String contributorTag = 'computeSuggestions - ${contributor
- .runtimeType}';
- performance.logStartTime(contributorTag);
- try {
- suggestions.addAll(await contributor.computeSuggestions(request));
- } on AbortCompletion {
- suggestions.clear();
- break;
- }
- performance.logElapseTime(contributorTag);
+ CompletionContributor contributor = new DartCompletionManager();
+ String contributorTag = 'computeSuggestions - ${contributor
+ .runtimeType}';
+ performance.logStartTime(contributorTag);
+ try {
+ suggestions.addAll(await contributor.computeSuggestions(request));
+ } on AbortCompletion {
+ suggestions.clear();
}
+ performance.logElapseTime(contributorTag);
performance.logElapseTime(COMPUTE_SUGGESTIONS_TAG);
}
// TODO (danrubel) if request is obsolete (processAnalysisRequest returns
« no previous file with comments | « pkg/analysis_server/lib/src/domain_analysis.dart ('k') | pkg/analysis_server/lib/src/domains/analysis/navigation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698