| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.plugin.engine_plugin; | 5 library analyzer.src.plugin.engine_plugin; |
| 6 | 6 |
| 7 import 'package:analyzer/plugin/task.dart'; | 7 import 'package:analyzer/plugin/task.dart'; |
| 8 import 'package:analyzer/src/task/dart.dart'; | 8 import 'package:analyzer/src/task/dart.dart'; |
| 9 import 'package:analyzer/src/task/general.dart'; | 9 import 'package:analyzer/src/task/general.dart'; |
| 10 import 'package:analyzer/src/task/html.dart'; |
| 10 import 'package:analyzer/task/model.dart'; | 11 import 'package:analyzer/task/model.dart'; |
| 11 import 'package:plugin/plugin.dart'; | 12 import 'package:plugin/plugin.dart'; |
| 12 | 13 |
| 13 /** | 14 /** |
| 14 * A plugin that defines the extension points and extensions that are inherently | 15 * A plugin that defines the extension points and extensions that are inherently |
| 15 * defined by the analysis engine. | 16 * defined by the analysis engine. |
| 16 */ | 17 */ |
| 17 class EnginePlugin implements Plugin { | 18 class EnginePlugin implements Plugin { |
| 18 /** | 19 /** |
| 19 * The simple identifier of the extension point that allows plugins to | 20 * The simple identifier of the extension point that allows plugins to |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 registerExtension(taskId, ResolveLibraryReferencesTask.DESCRIPTOR); | 87 registerExtension(taskId, ResolveLibraryReferencesTask.DESCRIPTOR); |
| 87 registerExtension(taskId, ResolveLibraryTypeNamesTask.DESCRIPTOR); | 88 registerExtension(taskId, ResolveLibraryTypeNamesTask.DESCRIPTOR); |
| 88 registerExtension(taskId, ResolveUnitReferencesTask.DESCRIPTOR); | 89 registerExtension(taskId, ResolveUnitReferencesTask.DESCRIPTOR); |
| 89 registerExtension(taskId, ResolveUnitTypeNamesTask.DESCRIPTOR); | 90 registerExtension(taskId, ResolveUnitTypeNamesTask.DESCRIPTOR); |
| 90 registerExtension(taskId, ResolveVariableReferencesTask.DESCRIPTOR); | 91 registerExtension(taskId, ResolveVariableReferencesTask.DESCRIPTOR); |
| 91 registerExtension(taskId, ScanDartTask.DESCRIPTOR); | 92 registerExtension(taskId, ScanDartTask.DESCRIPTOR); |
| 92 registerExtension(taskId, VerifyUnitTask.DESCRIPTOR); | 93 registerExtension(taskId, VerifyUnitTask.DESCRIPTOR); |
| 93 // | 94 // |
| 94 // Register HTML tasks. | 95 // Register HTML tasks. |
| 95 // | 96 // |
| 97 registerExtension(taskId, ParseHtmlTask.DESCRIPTOR); |
| 96 } | 98 } |
| 97 | 99 |
| 98 /** | 100 /** |
| 99 * Validate the given extension by throwing an [ExtensionError] if it is not a | 101 * Validate the given extension by throwing an [ExtensionError] if it is not a |
| 100 * valid domain. | 102 * valid domain. |
| 101 */ | 103 */ |
| 102 void _validateTaskExtension(Object extension) { | 104 void _validateTaskExtension(Object extension) { |
| 103 if (extension is! TaskDescriptor) { | 105 if (extension is! TaskDescriptor) { |
| 104 String id = taskExtensionPoint.uniqueIdentifier; | 106 String id = taskExtensionPoint.uniqueIdentifier; |
| 105 throw new ExtensionError('Extensions to $id must be a TaskDescriptor'); | 107 throw new ExtensionError('Extensions to $id must be a TaskDescriptor'); |
| 106 } | 108 } |
| 107 } | 109 } |
| 108 } | 110 } |
| OLD | NEW |