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

Unified Diff: analyzer/lib/src/plugin/options_plugin.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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 | « analyzer/lib/src/plugin/engine_plugin.dart ('k') | analyzer/lib/src/services/lint.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: analyzer/lib/src/plugin/options_plugin.dart
diff --git a/analyzer/lib/src/plugin/options_plugin.dart b/analyzer/lib/src/plugin/options_plugin.dart
deleted file mode 100644
index 1dea284aa418db185a88155051e9d2220f4bf362..0000000000000000000000000000000000000000
--- a/analyzer/lib/src/plugin/options_plugin.dart
+++ /dev/null
@@ -1,51 +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.options;
-
-import 'package:analyzer/plugin/options.dart';
-import 'package:plugin/plugin.dart';
-
-/// A plugin that defines the extension points and extensions that are defined
-/// by applications that want to consume options defined in the analysis
-/// options file.
-class OptionsPlugin implements Plugin {
-
- /// The simple identifier of the extension point that allows plugins to
- /// register new options processors.
- static const String OPTIONS_PROCESSOR_EXTENSION_POINT = 'optionsProcessor';
-
- /// The unique identifier of this plugin.
- static const String UNIQUE_IDENTIFIER = 'options.core';
-
- /// The extension point that allows plugins to register new options processors.
- ExtensionPoint optionsProcessorExtensionPoint;
-
- /// All contributed options processors.
- List<OptionsProcessor> get optionsProcessors =>
- optionsProcessorExtensionPoint.extensions;
-
- @override
- String get uniqueIdentifier => UNIQUE_IDENTIFIER;
-
- @override
- void registerExtensionPoints(RegisterExtensionPoint registerExtensionPoint) {
- optionsProcessorExtensionPoint = registerExtensionPoint(
- OPTIONS_PROCESSOR_EXTENSION_POINT, _validateOptionsProcessorExtension);
- }
-
- @override
- void registerExtensions(RegisterExtension registerExtension) {
- // There are no default extensions.
- }
-
- /// Validate the given extension by throwing an [ExtensionError] if it is not a
- /// valid options processor.
- void _validateOptionsProcessorExtension(Object extension) {
- if (extension is! OptionsProcessor) {
- String id = optionsProcessorExtensionPoint.uniqueIdentifier;
- throw new ExtensionError('Extensions to $id must be an OptionsProcessor');
- }
- }
-}
« no previous file with comments | « analyzer/lib/src/plugin/engine_plugin.dart ('k') | analyzer/lib/src/services/lint.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698