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

Unified Diff: pkg/analysis_server/lib/src/provisional/completion/dart/completion_plugin.dart

Issue 1965083002: Update to use the latest version of the plugin package (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Patch version info Created 4 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/plugin/server_plugin.dart ('k') | pkg/analysis_server/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/provisional/completion/dart/completion_plugin.dart
diff --git a/pkg/analysis_server/lib/src/provisional/completion/dart/completion_plugin.dart b/pkg/analysis_server/lib/src/provisional/completion/dart/completion_plugin.dart
index cf34c94ee8357b8a9a58e21bd3e1ca5197afeba4..8338c9224617413db1e45fafa05f10a75b876728 100644
--- a/pkg/analysis_server/lib/src/provisional/completion/dart/completion_plugin.dart
+++ b/pkg/analysis_server/lib/src/provisional/completion/dart/completion_plugin.dart
@@ -50,7 +50,7 @@ class DartCompletionPlugin implements Plugin {
* The extension point that allows plugins to register Dart specific
* completion contributor factories.
*/
- ExtensionPoint _contributorExtensionPoint;
+ ExtensionPoint<DartCompletionContributorFactory> _contributorExtensionPoint;
/**
* Return a list containing all of the Dart specific completion contributors.
@@ -64,9 +64,10 @@ class DartCompletionPlugin implements Plugin {
@override
void registerExtensionPoints(RegisterExtensionPoint registerExtensionPoint) {
- _contributorExtensionPoint = registerExtensionPoint(
- CONTRIBUTOR_EXTENSION_POINT,
- _validateDartCompletionContributorExtension);
+ _contributorExtensionPoint =
+ new ExtensionPoint<DartCompletionContributorFactory>(
+ this, CONTRIBUTOR_EXTENSION_POINT, null);
+ registerExtensionPoint(_contributorExtensionPoint);
}
@override
@@ -119,16 +120,4 @@ class DartCompletionPlugin implements Plugin {
registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
() => new VariableNameContributor());
}
-
- /**
- * Validate the given extension by throwing an [ExtensionError] if it is not a
- * valid Dart specific completion contributor.
- */
- void _validateDartCompletionContributorExtension(Object extension) {
- if (extension is! DartCompletionContributorFactory) {
- String id = _contributorExtensionPoint.uniqueIdentifier;
- throw new ExtensionError(
- 'Extensions to $id must be a DartCompletionContributorFactory');
- }
- }
}
« no previous file with comments | « pkg/analysis_server/lib/src/plugin/server_plugin.dart ('k') | pkg/analysis_server/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698