OLD | NEW |
| (Empty) |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 /** | |
6 * Support for client code that extends the analysis server by adding new code | |
7 * completion contributors. | |
8 * | |
9 * Plugins can register completion contributor factories. | |
10 * The registered contributor factories will be used to instantiate new | |
11 * contributors to get completions any time a client issues | |
12 * a 'completion.getSuggestions' request. | |
13 * | |
14 * If a plugin wants to add completions, it should implement | |
15 * [CompletionContributorFactory] by including code | |
16 * like the following in the plugin's registerExtensions method: | |
17 * | |
18 * @override | |
19 * void registerExtensions(RegisterExtension registerExtension) { | |
20 * ... | |
21 * registerExtension( | |
22 * COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | |
23 * () => new MyCompletionContributor()); | |
24 * ... | |
25 * } | |
26 */ | |
27 import 'package:analysis_server/src/plugin/server_plugin.dart'; | |
28 import 'package:plugin/plugin.dart'; | |
29 | |
30 /** | |
31 * The identifier of the extension point that allows plugins to register code | |
32 * completion contributors. The object used as an extension must be a | |
33 * [CompletionContributorFactory]. | |
34 */ | |
35 final String COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID = Plugin.join( | |
36 ServerPlugin.UNIQUE_IDENTIFIER, | |
37 ServerPlugin.COMPLETION_CONTRIBUTOR_EXTENSION_POINT); | |
OLD | NEW |