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

Unified Diff: pkg/analyzer_cli/lib/src/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 | « pkg/analyzer/tool/task_dependency_graph/generate.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/driver.dart
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index 752cb1e87597f572754ca4169c4936a35a1a6f7d..f69e935f5dd49b5fa33944eed2c51ab043a17303 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -35,6 +35,7 @@ import 'package:package_config/packages.dart' show Packages;
import 'package:package_config/packages_file.dart' as pkgfile show parse;
import 'package:package_config/src/packages_impl.dart' show MapPackages;
import 'package:path/path.dart' as path;
+import 'package:plugin/manager.dart';
import 'package:plugin/plugin.dart';
import 'package:yaml/yaml.dart';
@@ -500,12 +501,14 @@ class Driver {
void _processPlugins() {
List<Plugin> plugins = <Plugin>[];
+ plugins.addAll(AnalysisEngine.instance.requiredPlugins);
+ plugins.add(AnalysisEngine.instance.commandLinePlugin);
+ plugins.add(AnalysisEngine.instance.optionsPlugin);
plugins.add(linterPlugin);
plugins.addAll(_userDefinedPlugins);
- AnalysisEngine.instance.userDefinedPlugins = plugins;
- // This ensures that AE extension manager processes plugins.
- AnalysisEngine.instance.taskManager;
+ ExtensionManager manager = new ExtensionManager();
+ manager.processPlugins(plugins);
}
/// Analyze a single source.
« no previous file with comments | « pkg/analyzer/tool/task_dependency_graph/generate.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698