Chromium Code Reviews| Index: pkg/analyzer/lib/src/generated/engine.dart |
| diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart |
| index 597d3819955bd14e5fb190d9804c795455079bfc..d36e97b8619aa89b6536aec8d8c39388d3d781a8 100644 |
| --- a/pkg/analyzer/lib/src/generated/engine.dart |
| +++ b/pkg/analyzer/lib/src/generated/engine.dart |
| @@ -5925,11 +5925,6 @@ class AnalysisEngine { |
| InstrumentationService.NULL_SERVICE; |
| /** |
| - * The list of supported plugins for processing by clients. |
| - */ |
| - List<Plugin> _supportedPlugins; |
| - |
| - /** |
| * The partition manager being used to manage the shared partitions. |
| */ |
| final PartitionManager partitionManager = new PartitionManager(); |
| @@ -5953,11 +5948,6 @@ class AnalysisEngine { |
| bool limitInvalidationInTaskModel = false; |
| /** |
| - * The plugins that are defined outside the `analyzer` package. |
| - */ |
| - List<Plugin> _userDefinedPlugins = <Plugin>[]; |
| - |
| - /** |
| * The task manager used to manage the tasks used to analyze code. |
| */ |
| TaskManager _taskManager; |
| @@ -6000,15 +5990,7 @@ class AnalysisEngine { |
| * Return the list of supported plugins for processing by clients. |
| */ |
| List<Plugin> get supportedPlugins { |
| - if (_supportedPlugins == null) { |
| - _supportedPlugins = <Plugin>[ |
| - enginePlugin, |
| - commandLinePlugin, |
| - optionsPlugin |
| - ]; |
| - _supportedPlugins.addAll(_userDefinedPlugins); |
| - } |
| - return _supportedPlugins; |
| + return <Plugin>[enginePlugin, commandLinePlugin, optionsPlugin]; |
|
pquitslund
2015/11/20 04:34:09
Is there any reason not to cache this in a const l
Brian Wilkerson
2015/11/20 14:23:17
No, but I expect each client to call this method e
|
| } |
| /** |
| @@ -6016,7 +5998,10 @@ class AnalysisEngine { |
| */ |
| TaskManager get taskManager { |
| if (_taskManager == null) { |
| - new ExtensionManager().processPlugins(supportedPlugins); |
| + if (enginePlugin.taskExtensionPoint == null) { |
| + throw new IllegalStateException( |
| + 'The analysis engine plugin has not been registered'); |
| + } |
| _taskManager = new TaskManager(); |
| _taskManager.addTaskDescriptors(enginePlugin.taskDescriptors); |
| // TODO(brianwilkerson) Create a way to associate different results with |
| @@ -6027,18 +6012,6 @@ class AnalysisEngine { |
| } |
| /** |
| - * Set plugins that are defined outside the `analyzer` package. |
| - */ |
| - void set userDefinedPlugins(List<Plugin> plugins) { |
| - if (plugins == null) { |
| - plugins = <Plugin>[]; |
| - } |
| - _userDefinedPlugins = plugins; |
| - _supportedPlugins = null; |
| - _taskManager = null; |
| - } |
| - |
| - /** |
| * Clear any caches holding on to analysis results so that a full re-analysis |
| * will be performed the next time an analysis context is created. |
| */ |