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

Side by Side Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 1179743003: Supported plugin access. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine; 8 library engine;
9 9
10 import 'dart:async'; 10 import 'dart:async';
11 import 'dart:collection'; 11 import 'dart:collection';
12 import 'dart:math' as math; 12 import 'dart:math' as math;
13 13
14 import 'package:analyzer/src/cancelable_future.dart'; 14 import 'package:analyzer/src/cancelable_future.dart';
15 import 'package:analyzer/src/context/cache.dart' as cache; 15 import 'package:analyzer/src/context/cache.dart' as cache;
16 import 'package:analyzer/src/context/context.dart' as newContext; 16 import 'package:analyzer/src/context/context.dart' as newContext;
17 import 'package:analyzer/src/generated/incremental_resolution_validator.dart'; 17 import 'package:analyzer/src/generated/incremental_resolution_validator.dart';
18 import 'package:analyzer/src/plugin/command_line_plugin.dart';
18 import 'package:analyzer/src/plugin/engine_plugin.dart'; 19 import 'package:analyzer/src/plugin/engine_plugin.dart';
20 import 'package:analyzer/src/plugin/options_plugin.dart';
19 import 'package:analyzer/src/services/lint.dart'; 21 import 'package:analyzer/src/services/lint.dart';
20 import 'package:analyzer/src/task/manager.dart'; 22 import 'package:analyzer/src/task/manager.dart';
21 import 'package:analyzer/src/task/task_dart.dart'; 23 import 'package:analyzer/src/task/task_dart.dart';
22 import 'package:analyzer/task/dart.dart'; 24 import 'package:analyzer/task/dart.dart';
23 import 'package:analyzer/task/model.dart'; 25 import 'package:analyzer/task/model.dart';
24 import 'package:plugin/manager.dart'; 26 import 'package:plugin/manager.dart';
27 import 'package:plugin/plugin.dart';
25 28
26 import '../../instrumentation/instrumentation.dart'; 29 import '../../instrumentation/instrumentation.dart';
27 import 'ast.dart'; 30 import 'ast.dart';
28 import 'constant.dart'; 31 import 'constant.dart';
29 import 'element.dart'; 32 import 'element.dart';
30 import 'error.dart'; 33 import 'error.dart';
31 import 'error_verifier.dart'; 34 import 'error_verifier.dart';
32 import 'html.dart' as ht; 35 import 'html.dart' as ht;
33 import 'incremental_resolver.dart' 36 import 'incremental_resolver.dart'
34 show IncrementalResolver, PoorMansIncrementalResolver; 37 show IncrementalResolver, PoorMansIncrementalResolver;
(...skipping 5687 matching lines...) Expand 10 before | Expand all | Expand 10 after
5722 */ 5725 */
5723 static final AnalysisEngine instance = new AnalysisEngine._(); 5726 static final AnalysisEngine instance = new AnalysisEngine._();
5724 5727
5725 /** 5728 /**
5726 * The logger that should receive information about errors within the analysis 5729 * The logger that should receive information about errors within the analysis
5727 * engine. 5730 * engine.
5728 */ 5731 */
5729 Logger _logger = Logger.NULL; 5732 Logger _logger = Logger.NULL;
5730 5733
5731 /** 5734 /**
5735 * The plugin that defines the extension points and extensions that are define d by
5736 * command-line applications using the analysis engine.
5737 */
5738 final CommandLinePlugin commandLinePlugin = new CommandLinePlugin();
5739
5740 /**
5732 * The plugin that defines the extension points and extensions that are 5741 * The plugin that defines the extension points and extensions that are
5733 * inherently defined by the analysis engine. 5742 * inherently defined by the analysis engine.
5734 */ 5743 */
5735 final EnginePlugin enginePlugin = new EnginePlugin(); 5744 final EnginePlugin enginePlugin = new EnginePlugin();
5736 5745
5746 /***
5747 * The plugin that defines the extension points and extensions that are define d
5748 * by applications that want to consume options defined in the analysis
5749 * options file.
5750 */
5751 final OptionsPlugin optionsPlugin = new OptionsPlugin();
5752
5737 /** 5753 /**
5738 * The instrumentation service that is to be used by this analysis engine. 5754 * The instrumentation service that is to be used by this analysis engine.
5739 */ 5755 */
5740 InstrumentationService _instrumentationService = 5756 InstrumentationService _instrumentationService =
5741 InstrumentationService.NULL_SERVICE; 5757 InstrumentationService.NULL_SERVICE;
5742 5758
5743 /** 5759 /**
5760 * The list of supported plugins for processing by clients.
5761 */
5762 List<Plugin> _supportedPlugins;
5763
5764 /**
5744 * The partition manager being used to manage the shared partitions. 5765 * The partition manager being used to manage the shared partitions.
5745 */ 5766 */
5746 final PartitionManager partitionManager = new PartitionManager(); 5767 final PartitionManager partitionManager = new PartitionManager();
5747 5768
5748 /** 5769 /**
5749 * The partition manager being used to manage the shared partitions. 5770 * The partition manager being used to manage the shared partitions.
5750 */ 5771 */
5751 final newContext.PartitionManager partitionManager_new = 5772 final newContext.PartitionManager partitionManager_new =
5752 new newContext.PartitionManager(); 5773 new newContext.PartitionManager();
5753 5774
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
5790 5811
5791 /** 5812 /**
5792 * Set the logger that should receive information about errors within the 5813 * Set the logger that should receive information about errors within the
5793 * analysis engine to the given [logger]. 5814 * analysis engine to the given [logger].
5794 */ 5815 */
5795 void set logger(Logger logger) { 5816 void set logger(Logger logger) {
5796 this._logger = logger == null ? Logger.NULL : logger; 5817 this._logger = logger == null ? Logger.NULL : logger;
5797 } 5818 }
5798 5819
5799 /** 5820 /**
5821 * Get the list of supported plugins for processing by clients.
Brian Wilkerson 2015/06/11 18:31:55 nit: "Get" --> "Return", just for consistency.
5822 */
5823 List<Plugin> get supportedPlugins {
5824 if (_supportedPlugins == null) {
5825 _supportedPlugins = <Plugin>[enginePlugin, commandLinePlugin, optionsPlugi n];
5826 }
5827 return _supportedPlugins;
5828 }
5829
5830 /**
5800 * Return the task manager used to manage the tasks used to analyze code. 5831 * Return the task manager used to manage the tasks used to analyze code.
5801 */ 5832 */
5802 TaskManager get taskManager { 5833 TaskManager get taskManager {
5803 if (_taskManager == null) { 5834 if (_taskManager == null) {
5804 if (enginePlugin.taskExtensionPoint == null) { 5835 if (enginePlugin.taskExtensionPoint == null) {
5805 // The plugin wasn't used, so tasks are not registered. 5836 // The plugin wasn't used, so tasks are not registered.
5806 new ExtensionManager().processPlugins([enginePlugin]); 5837 new ExtensionManager().processPlugins([enginePlugin]);
5807 } 5838 }
5808 _taskManager = new TaskManager(); 5839 _taskManager = new TaskManager();
5809 _taskManager.addTaskDescriptors(enginePlugin.taskDescriptors); 5840 _taskManager.addTaskDescriptors(enginePlugin.taskDescriptors);
(...skipping 5959 matching lines...) Expand 10 before | Expand all | Expand 10 after
11769 PendingFuture pendingFuture = 11800 PendingFuture pendingFuture =
11770 new PendingFuture<T>(_context, source, computeValue); 11801 new PendingFuture<T>(_context, source, computeValue);
11771 if (!pendingFuture.evaluate(sourceEntry)) { 11802 if (!pendingFuture.evaluate(sourceEntry)) {
11772 _context._pendingFutureSources 11803 _context._pendingFutureSources
11773 .putIfAbsent(source, () => <PendingFuture>[]) 11804 .putIfAbsent(source, () => <PendingFuture>[])
11774 .add(pendingFuture); 11805 .add(pendingFuture);
11775 } 11806 }
11776 return pendingFuture.future; 11807 return pendingFuture.future;
11777 } 11808 }
11778 } 11809 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698