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

Unified Diff: pkg/analysis_server/lib/src/server/driver.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 | « no previous file | pkg/analysis_server/test/abstract_context.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/server/driver.dart
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index 1238a1c462cb5795c510623e2dc3a297897db557..2d62373120892bd7b91c09c1c0dee3c1ca064274 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -26,6 +26,7 @@ import 'package:analyzer/src/generated/sdk.dart';
import 'package:analyzer/src/generated/sdk_io.dart';
import 'package:args/args.dart';
import 'package:linter/src/plugin/linter_plugin.dart';
+import 'package:plugin/manager.dart';
import 'package:plugin/plugin.dart';
/**
@@ -405,16 +406,16 @@ class Driver implements ServerStarter {
//
ServerPlugin serverPlugin = new ServerPlugin();
List<Plugin> plugins = <Plugin>[];
+ plugins.addAll(AnalysisEngine.instance.requiredPlugins);
+ plugins.add(AnalysisEngine.instance.commandLinePlugin);
+ plugins.add(AnalysisEngine.instance.optionsPlugin);
plugins.add(serverPlugin);
- plugins.addAll(_userDefinedPlugins);
plugins.add(linterPlugin);
plugins.add(linterServerPlugin);
+ plugins.addAll(_userDefinedPlugins);
- // Defer to the extension manager in AE for plugin registration.
- AnalysisEngine.instance.userDefinedPlugins = plugins;
- // Force registration.
- AnalysisEngine.instance.taskManager;
-
+ ExtensionManager manager = new ExtensionManager();
+ manager.processPlugins(plugins);
//
// Create the sockets and start listening for requests.
//
« no previous file with comments | « no previous file | pkg/analysis_server/test/abstract_context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698