| OLD | NEW |
| 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 /** | 5 /** |
| 6 * Support for client code that extends the analysis server by adding new | 6 * Support for client code that extends the analysis server by adding new |
| 7 * navigation contributors. | 7 * navigation contributors. |
| 8 * | 8 * |
| 9 * Plugins can register navigation contributors. The registered contributors | 9 * Plugins can register navigation contributors. The registered contributors |
| 10 * will be used to get navigation regions any time a client issues an | 10 * will be used to get navigation regions any time a client issues an |
| 11 * 'analysis.getNavigation' request or the server is about to send an | 11 * 'analysis.getNavigation' request or the server is about to send an |
| 12 * 'analysis.navigation' notification. | 12 * 'analysis.navigation' notification. |
| 13 * | 13 * |
| 14 * If a plugin wants to add navigation regions, it should implement the class | 14 * If a plugin wants to add navigation regions, it should implement the class |
| 15 * [NavigationContributor] and then register the contributor by including code | 15 * [NavigationContributor] and then register the contributor by including code |
| 16 * like the following in the plugin's registerExtensions method: | 16 * like the following in the plugin's registerExtensions method: |
| 17 * | 17 * |
| 18 * @override | 18 * @override |
| 19 * void registerExtensions(RegisterExtension registerExtension) { | 19 * void registerExtensions(RegisterExtension registerExtension) { |
| 20 * ... | 20 * ... |
| 21 * registerExtension( | 21 * registerExtension( |
| 22 * NAVIGATION_CONTRIBUTOR_EXTENSION_POINT_ID, | 22 * NAVIGATION_CONTRIBUTOR_EXTENSION_POINT_ID, |
| 23 * new MyNavigationContributor()); | 23 * new MyNavigationContributor()); |
| 24 * ... | 24 * ... |
| 25 * } | 25 * } |
| 26 */ | 26 */ |
| 27 library analysis_server.plugin.analysis.navigation.navigation; | |
| 28 | |
| 29 import 'package:analysis_server/plugin/analysis/navigation/navigation_core.dart'
; | 27 import 'package:analysis_server/plugin/analysis/navigation/navigation_core.dart'
; |
| 30 import 'package:analysis_server/src/plugin/server_plugin.dart'; | 28 import 'package:analysis_server/src/plugin/server_plugin.dart'; |
| 31 import 'package:plugin/plugin.dart'; | 29 import 'package:plugin/plugin.dart'; |
| 32 | 30 |
| 33 /** | 31 /** |
| 34 * The identifier of the extension point that allows plugins to register | 32 * The identifier of the extension point that allows plugins to register |
| 35 * navigation contributors. The object used as an extension must be | 33 * navigation contributors. The object used as an extension must be |
| 36 * a [NavigationContributor]. | 34 * a [NavigationContributor]. |
| 37 */ | 35 */ |
| 38 final String NAVIGATION_CONTRIBUTOR_EXTENSION_POINT_ID = Plugin.join( | 36 final String NAVIGATION_CONTRIBUTOR_EXTENSION_POINT_ID = Plugin.join( |
| 39 ServerPlugin.UNIQUE_IDENTIFIER, | 37 ServerPlugin.UNIQUE_IDENTIFIER, |
| 40 ServerPlugin.NAVIGATION_CONTRIBUTOR_EXTENSION_POINT); | 38 ServerPlugin.NAVIGATION_CONTRIBUTOR_EXTENSION_POINT); |
| OLD | NEW |