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

Unified Diff: pkg/analysis_server/test/analysis_abstract.dart

Issue 1487953002: Clean-up the registration of plugins (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 | « pkg/analysis_server/test/abstract_context.dart ('k') | pkg/analysis_server/test/analysis_server_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/analysis_abstract.dart
diff --git a/pkg/analysis_server/test/analysis_abstract.dart b/pkg/analysis_server/test/analysis_abstract.dart
index c367665b7177592483304d20a54ae07118449abd..62636d624e0e19eae1ca4aac8c1827208c1f7d0d 100644
--- a/pkg/analysis_server/test/analysis_abstract.dart
+++ b/pkg/analysis_server/test/analysis_abstract.dart
@@ -96,21 +96,26 @@ class AbstractAnalysisTest {
}
AnalysisServer createAnalysisServer(Index index) {
+ //
+ // Collect plugins
+ //
ServerPlugin serverPlugin = new ServerPlugin();
- // TODO(pq): this convoluted extension registry dance needs cleanup.
- List<Plugin> plugins = <Plugin>[
- serverPlugin,
- linterPlugin,
- linterServerPlugin
- ];
- // Accessing `taskManager` ensures that AE plugins are registered.
- AnalysisEngine.instance.taskManager;
- plugins.addAll(AnalysisEngine.instance.supportedPlugins);
+ List<Plugin> plugins = <Plugin>[];
+ plugins.addAll(AnalysisEngine.instance.requiredPlugins);
+ plugins.add(AnalysisEngine.instance.commandLinePlugin);
+ plugins.add(AnalysisEngine.instance.optionsPlugin);
+ plugins.add(serverPlugin);
+ plugins.add(linterPlugin);
+ plugins.add(linterServerPlugin);
addServerPlugins(plugins);
- // process plugins
+ //
+ // Process plugins
+ //
ExtensionManager manager = new ExtensionManager();
manager.processPlugins(plugins);
- // create server
+ //
+ // Create server
+ //
return new AnalysisServer(
serverChannel,
resourceProvider,
« no previous file with comments | « pkg/analysis_server/test/abstract_context.dart ('k') | pkg/analysis_server/test/analysis_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698