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

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

Issue 1523343004: Restore auto-processing of plugins (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years 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 library analyzer.src.generated.engine; 5 library analyzer.src.generated.engine;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 * [processRequiredPlugins]. 817 * [processRequiredPlugins].
818 */ 818 */
819 List<Plugin> get requiredPlugins => <Plugin>[enginePlugin]; 819 List<Plugin> get requiredPlugins => <Plugin>[enginePlugin];
820 820
821 /** 821 /**
822 * Return the task manager used to manage the tasks used to analyze code. 822 * Return the task manager used to manage the tasks used to analyze code.
823 */ 823 */
824 TaskManager get taskManager { 824 TaskManager get taskManager {
825 if (_taskManager == null) { 825 if (_taskManager == null) {
826 if (enginePlugin.taskExtensionPoint == null) { 826 if (enginePlugin.taskExtensionPoint == null) {
827 throw new IllegalStateException( 827 processRequiredPlugins();
828 'The analysis engine plugin has not been registered');
829 } 828 }
830 _taskManager = new TaskManager(); 829 _taskManager = new TaskManager();
831 _taskManager.addTaskDescriptors(enginePlugin.taskDescriptors); 830 _taskManager.addTaskDescriptors(enginePlugin.taskDescriptors);
832 // TODO(brianwilkerson) Create a way to associate different results with 831 // TODO(brianwilkerson) Create a way to associate different results with
833 // different file suffixes, then make this pluggable. 832 // different file suffixes, then make this pluggable.
834 _taskManager.addGeneralResult(DART_ERRORS); 833 _taskManager.addGeneralResult(DART_ERRORS);
835 } 834 }
836 return _taskManager; 835 return _taskManager;
837 } 836 }
838 837
(...skipping 12 matching lines...) Expand all
851 return new AnalysisContextImpl(); 850 return new AnalysisContextImpl();
852 } 851 }
853 852
854 /** 853 /**
855 * A utility method that clients can use to process all of the required 854 * A utility method that clients can use to process all of the required
856 * plugins. This method can only be used by clients that do not need to 855 * plugins. This method can only be used by clients that do not need to
857 * process any other plugins. 856 * process any other plugins.
858 */ 857 */
859 void processRequiredPlugins() { 858 void processRequiredPlugins() {
860 ExtensionManager manager = new ExtensionManager(); 859 ExtensionManager manager = new ExtensionManager();
861 manager.processPlugins(AnalysisEngine.instance.requiredPlugins); 860 manager.processPlugins(requiredPlugins);
862 } 861 }
863 862
864 /** 863 /**
865 * Return `true` if the given [fileName] is an analysis options file. 864 * Return `true` if the given [fileName] is an analysis options file.
866 */ 865 */
867 static bool isAnalysisOptionsFileName(String fileName, 866 static bool isAnalysisOptionsFileName(String fileName,
868 [pathos.Context context]) { 867 [pathos.Context context]) {
869 if (fileName == null) { 868 if (fileName == null) {
870 return false; 869 return false;
871 } 870 }
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
2397 * The data that was created from the source. 2396 * The data that was created from the source.
2398 */ 2397 */
2399 final E data; 2398 final E data;
2400 2399
2401 /** 2400 /**
2402 * Initialize a newly created holder to associate the given [data] with the 2401 * Initialize a newly created holder to associate the given [data] with the
2403 * given [modificationTime]. 2402 * given [modificationTime].
2404 */ 2403 */
2405 TimestampedData(this.modificationTime, this.data); 2404 TimestampedData(this.modificationTime, this.data);
2406 } 2405 }
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