From 28ba179e31aed544cff02f50232695ada2241fb9 Mon Sep 17 00:00:00 2001 From: keertip Date: Fri, 10 Apr 2015 08:39:31 -0700 Subject: [PATCH] feat: intiial commit for angular 2 dart analysis Initial commit for analysis support to Angular 2 Dart --- .../src/analysis/analyzer_plugin/plugin.dart | 22 ++++++++++++++++++ .../src/analysis/server_plugin/plugin.dart | 23 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 modules/angular2/src/analysis/analyzer_plugin/plugin.dart create mode 100644 modules/angular2/src/analysis/server_plugin/plugin.dart diff --git a/modules/angular2/src/analysis/analyzer_plugin/plugin.dart b/modules/angular2/src/analysis/analyzer_plugin/plugin.dart new file mode 100644 index 0000000000..ddf9b0e9ca --- /dev/null +++ b/modules/angular2/src/analysis/analyzer_plugin/plugin.dart @@ -0,0 +1,22 @@ +library angular2.src.analysis.analyzer_plugin; + +import 'package:analyzer/plugin/plugin.dart'; + +/// Contribute a plugin to the dart analyzer for analysis of +/// Angular 2 dart code. +class AngularAnalyzerPlugin implements Plugin { + + /// the unique indetifier for this plugin + static const String UNIQUE_IDENTIFIER = 'angular2.analysis'; + + @override + String get uniqueIdentifier => UNIQUE_IDENTIFIER; + + @override + void registerExtensionPoints(RegisterExtensionPoint registerExtensionPoint) {} + + @override + void registerExtensions(RegisterExtension registerExtension) { + // TODO(keerti): register extension for analysis + } +} diff --git a/modules/angular2/src/analysis/server_plugin/plugin.dart b/modules/angular2/src/analysis/server_plugin/plugin.dart new file mode 100644 index 0000000000..f19c81d6b8 --- /dev/null +++ b/modules/angular2/src/analysis/server_plugin/plugin.dart @@ -0,0 +1,23 @@ +library angular2.src.analysis.server_plugin; + +import 'package:analyzer/plugin/plugin.dart'; + +/// Contribute a plugin for services such as completions, indexing and refactoring +/// of Angular 2 dart code. +class AngularServerPlugin implements Plugin { + + /// the unique indetifier for this plugin + static const String UNIQUE_IDENTIFIER = 'angular2.analysis.services'; + + @override + String get uniqueIdentifier => UNIQUE_IDENTIFIER; + + @override + void registerExtensionPoints(RegisterExtensionPoint registerExtensionPoint) {} + + @override + void registerExtensions(RegisterExtension registerExtension) { + // TODO: register extension for code completions, indexing etc + + } +}