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

Side by Side Diff: pkg/analysis_server/lib/src/plugin/plugin_impl.dart

Issue 846723002: Make domains plugable (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 analysis_server.src.plugin.plugin_impl; 5 library analysis_server.src.plugin.plugin_impl;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analysis_server/plugin/plugin.dart'; 9 import 'package:analysis_server/plugin/plugin.dart';
10 10
(...skipping 12 matching lines...) Expand all
23 /** 23 /**
24 * Process each of the given [plugins] by allowing them to register extension 24 * Process each of the given [plugins] by allowing them to register extension
25 * points and extensions. 25 * points and extensions.
26 * 26 *
27 * An [ExtensionError] will be thrown if any of the plugins throws such an 27 * An [ExtensionError] will be thrown if any of the plugins throws such an
28 * exception while registering with this manager. 28 * exception while registering with this manager.
29 */ 29 */
30 void processPlugins(List<Plugin> plugins) { 30 void processPlugins(List<Plugin> plugins) {
31 for (Plugin plugin in plugins) { 31 for (Plugin plugin in plugins) {
32 plugin.registerExtensionPoints( 32 plugin.registerExtensionPoints(
33 (String identifier, [ExtensionValidator validator]) { 33 (String identifier, [ExtensionValidator validator]) =>
34 registerExtensionPoint(plugin, identifier, validator); 34 registerExtensionPoint(plugin, identifier, validator));
35 });
36 } 35 }
37 for (Plugin plugin in plugins) { 36 for (Plugin plugin in plugins) {
38 plugin.registerExtensions(registerExtension); 37 plugin.registerExtensions(registerExtension);
39 } 38 }
40 } 39 }
41 40
42 /** 41 /**
43 * Register an [extension] to the extension point with the given unique 42 * Register an [extension] to the extension point with the given unique
44 * [identifier]. 43 * [identifier].
45 */ 44 */
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 * Validate that the given [extension] is appropriate for this extension 114 * Validate that the given [extension] is appropriate for this extension
116 * point, and if it is then add it to the list of registered exceptions. 115 * point, and if it is then add it to the list of registered exceptions.
117 */ 116 */
118 void add(Object extension) { 117 void add(Object extension) {
119 if (validator != null) { 118 if (validator != null) {
120 validator(extension); 119 validator(extension);
121 } 120 }
122 _extensions.add(extension); 121 _extensions.add(extension);
123 } 122 }
124 } 123 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698