2015-04-10 11:39:31 -04:00
|
|
|
library angular2.src.analysis.analyzer_plugin;
|
|
|
|
|
|
|
|
import 'package:analyzer/plugin/plugin.dart';
|
2015-05-04 12:20:27 -04:00
|
|
|
import 'package:analyzer/plugin/task.dart';
|
|
|
|
import 'src/tasks.dart';
|
2015-04-10 11:39:31 -04:00
|
|
|
|
|
|
|
/// Contribute a plugin to the dart analyzer for analysis of
|
|
|
|
/// Angular 2 dart code.
|
|
|
|
class AngularAnalyzerPlugin implements Plugin {
|
|
|
|
|
2015-05-04 12:20:27 -04:00
|
|
|
/// The unique identifier for this plugin.
|
2015-04-10 11:39:31 -04:00
|
|
|
static const String UNIQUE_IDENTIFIER = 'angular2.analysis';
|
|
|
|
|
|
|
|
@override
|
|
|
|
String get uniqueIdentifier => UNIQUE_IDENTIFIER;
|
|
|
|
|
|
|
|
@override
|
|
|
|
void registerExtensionPoints(RegisterExtensionPoint registerExtensionPoint) {}
|
|
|
|
|
|
|
|
@override
|
|
|
|
void registerExtensions(RegisterExtension registerExtension) {
|
2015-05-04 12:20:27 -04:00
|
|
|
String taskId = TASK_EXTENSION_POINT_ID;
|
|
|
|
registerExtension(taskId, BuildUnitDirectivesTask.DESCRIPTOR);
|
2015-04-10 11:39:31 -04:00
|
|
|
}
|
|
|
|
}
|