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

Unified Diff: lib/src/driver.dart

Issue 1378193004: Fix Analysis Engine plugin setup. (Closed) Base URL: https://github.com/dart-lang/analyzer_cli.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | test/driver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/driver.dart
diff --git a/lib/src/driver.dart b/lib/src/driver.dart
index 793c5d429e9a9a31eaca43f8eb4428db8d8b347f..4af9f4e049c669d313699991d3746b6df81c7da2 100644
--- a/lib/src/driver.dart
+++ b/lib/src/driver.dart
@@ -368,6 +368,7 @@ class Driver {
_chooseDietParsingPolicy(options);
// Create a context using these policies.
AnalysisContext context = AnalysisEngine.instance.createAnalysisContext();
+
context.sourceFactory = sourceFactory;
if (options.strongMode) {
@@ -455,10 +456,11 @@ class Driver {
void _processPlugins() {
List<Plugin> plugins = <Plugin>[];
plugins.add(linterPlugin);
- plugins.addAll(AnalysisEngine.instance.supportedPlugins);
plugins.addAll(_userDefinedPlugins);
- ExtensionManager manager = new ExtensionManager();
- manager.processPlugins(plugins);
+ AnalysisEngine.instance.userDefinedPlugins = plugins;
+
+ // This ensures that AE extension manager processes plugins.
+ AnalysisEngine.instance.taskManager;
}
/// Analyze a single source.
« no previous file with comments | « no previous file | test/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698