| Index: analyzer/lib/src/plugin/engine_plugin.dart
|
| diff --git a/analyzer/lib/src/plugin/engine_plugin.dart b/analyzer/lib/src/plugin/engine_plugin.dart
|
| deleted file mode 100644
|
| index eb516de99ac6be40f590558b467719c7cecf2e14..0000000000000000000000000000000000000000
|
| --- a/analyzer/lib/src/plugin/engine_plugin.dart
|
| +++ /dev/null
|
| @@ -1,110 +0,0 @@
|
| -// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
|
| -// for details. All rights reserved. Use of this source code is governed by a
|
| -// BSD-style license that can be found in the LICENSE file.
|
| -
|
| -library analyzer.src.plugin.engine_plugin;
|
| -
|
| -import 'package:analyzer/plugin/task.dart';
|
| -import 'package:analyzer/src/task/dart.dart';
|
| -import 'package:analyzer/src/task/general.dart';
|
| -import 'package:analyzer/src/task/html.dart';
|
| -import 'package:analyzer/task/model.dart';
|
| -import 'package:plugin/plugin.dart';
|
| -
|
| -/**
|
| - * A plugin that defines the extension points and extensions that are inherently
|
| - * defined by the analysis engine.
|
| - */
|
| -class EnginePlugin implements Plugin {
|
| - /**
|
| - * The simple identifier of the extension point that allows plugins to
|
| - * register new analysis tasks with the analysis engine.
|
| - */
|
| - static const String TASK_EXTENSION_POINT = 'task';
|
| -
|
| - /**
|
| - * The unique identifier of this plugin.
|
| - */
|
| - static const String UNIQUE_IDENTIFIER = 'analysis_engine.core';
|
| -
|
| - /**
|
| - * The extension point that allows plugins to register new analysis tasks with
|
| - * the analysis engine.
|
| - */
|
| - ExtensionPoint taskExtensionPoint;
|
| -
|
| - /**
|
| - * Initialize a newly created plugin.
|
| - */
|
| - EnginePlugin();
|
| -
|
| - /**
|
| - * Return a list containing all of the task descriptors that were contributed.
|
| - */
|
| - List<TaskDescriptor> get taskDescriptors => taskExtensionPoint.extensions;
|
| -
|
| - @override
|
| - String get uniqueIdentifier => UNIQUE_IDENTIFIER;
|
| -
|
| - @override
|
| - void registerExtensionPoints(RegisterExtensionPoint registerExtensionPoint) {
|
| - taskExtensionPoint =
|
| - registerExtensionPoint(TASK_EXTENSION_POINT, _validateTaskExtension);
|
| - }
|
| -
|
| - @override
|
| - void registerExtensions(RegisterExtension registerExtension) {
|
| - String taskId = TASK_EXTENSION_POINT_ID;
|
| - //
|
| - // Register general tasks.
|
| - //
|
| - registerExtension(taskId, GetContentTask.DESCRIPTOR);
|
| - //
|
| - // Register Dart tasks.
|
| - //
|
| - registerExtension(taskId, BuildCompilationUnitElementTask.DESCRIPTOR);
|
| - registerExtension(taskId, BuildDirectiveElementsTask.DESCRIPTOR);
|
| - registerExtension(taskId, BuildEnumMemberElementsTask.DESCRIPTOR);
|
| - registerExtension(taskId, BuildExportNamespaceTask.DESCRIPTOR);
|
| - registerExtension(taskId, BuildLibraryElementTask.DESCRIPTOR);
|
| - registerExtension(taskId, BuildPublicNamespaceTask.DESCRIPTOR);
|
| - registerExtension(taskId, BuildSourceExportClosureTask.DESCRIPTOR);
|
| - registerExtension(taskId, BuildSourceImportExportClosureTask.DESCRIPTOR);
|
| - registerExtension(taskId, BuildTypeProviderTask.DESCRIPTOR);
|
| - registerExtension(taskId, ComputeConstantDependenciesTask.DESCRIPTOR);
|
| - registerExtension(taskId, ComputeConstantValueTask.DESCRIPTOR);
|
| - registerExtension(taskId, ContainingLibrariesTask.DESCRIPTOR);
|
| - registerExtension(taskId, DartErrorsTask.DESCRIPTOR);
|
| - registerExtension(taskId, EvaluateUnitConstantsTask.DESCRIPTOR);
|
| - registerExtension(taskId, GatherUsedImportedElementsTask.DESCRIPTOR);
|
| - registerExtension(taskId, GatherUsedLocalElementsTask.DESCRIPTOR);
|
| - registerExtension(taskId, GenerateHintsTask.DESCRIPTOR);
|
| - registerExtension(taskId, LibraryErrorsReadyTask.DESCRIPTOR);
|
| - registerExtension(taskId, LibraryUnitErrorsTask.DESCRIPTOR);
|
| - registerExtension(taskId, ParseDartTask.DESCRIPTOR);
|
| - registerExtension(taskId, ResolveLibraryReferencesTask.DESCRIPTOR);
|
| - registerExtension(taskId, ResolveLibraryTypeNamesTask.DESCRIPTOR);
|
| - registerExtension(taskId, ResolveUnitReferencesTask.DESCRIPTOR);
|
| - registerExtension(taskId, ResolveUnitTypeNamesTask.DESCRIPTOR);
|
| - registerExtension(taskId, ResolveVariableReferencesTask.DESCRIPTOR);
|
| - registerExtension(taskId, ScanDartTask.DESCRIPTOR);
|
| - registerExtension(taskId, VerifyUnitTask.DESCRIPTOR);
|
| - //
|
| - // Register HTML tasks.
|
| - //
|
| - registerExtension(taskId, DartScriptsTask.DESCRIPTOR);
|
| - registerExtension(taskId, HtmlErrorsTask.DESCRIPTOR);
|
| - registerExtension(taskId, ParseHtmlTask.DESCRIPTOR);
|
| - }
|
| -
|
| - /**
|
| - * Validate the given extension by throwing an [ExtensionError] if it is not a
|
| - * valid domain.
|
| - */
|
| - void _validateTaskExtension(Object extension) {
|
| - if (extension is! TaskDescriptor) {
|
| - String id = taskExtensionPoint.uniqueIdentifier;
|
| - throw new ExtensionError('Extensions to $id must be a TaskDescriptor');
|
| - }
|
| - }
|
| -}
|
|
|