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 library driver; | 5 library driver; |
6 | 6 |
| 7 import 'package:analysis_server/src/context_manager.dart'; |
7 import 'package:analysis_server/src/server/driver.dart'; | 8 import 'package:analysis_server/src/server/driver.dart'; |
8 import 'package:analysis_server/uri/resolver_provider.dart'; | 9 import 'package:analysis_server/uri/resolver_provider.dart'; |
9 import 'package:analyzer/instrumentation/instrumentation.dart'; | 10 import 'package:analyzer/instrumentation/instrumentation.dart'; |
10 import 'package:plugin/plugin.dart'; | 11 import 'package:plugin/plugin.dart'; |
11 | 12 |
12 /** | 13 /** |
13 * An object that can be used to start an analysis server. | 14 * An object that can be used to start an analysis server. |
14 */ | 15 */ |
15 abstract class ServerStarter { | 16 abstract class ServerStarter { |
16 /** | 17 /** |
17 * Initialize a newly created starter to start up an analysis server. | 18 * Initialize a newly created starter to start up an analysis server. |
18 */ | 19 */ |
19 factory ServerStarter() = Driver; | 20 factory ServerStarter() = Driver; |
20 | 21 |
21 /** | 22 /** |
| 23 * Set the context manager used to create analysis contexts within each of the |
| 24 * analysis roots. |
| 25 */ |
| 26 void set contextManager(ContextManager manager); |
| 27 |
| 28 /** |
22 * Set the instrumentation [server] that is to be used by the analysis server. | 29 * Set the instrumentation [server] that is to be used by the analysis server. |
23 */ | 30 */ |
24 void set instrumentationServer(InstrumentationServer server); | 31 void set instrumentationServer(InstrumentationServer server); |
25 | 32 |
26 /** | 33 /** |
27 * Set the package resolver provider used to override the way package URI's | 34 * Set the package resolver provider used to override the way package URI's |
28 * are resolved in some contexts. The provider should return `null` if the | 35 * are resolved in some contexts. The provider should return `null` if the |
29 * default package resolution scheme should be used instead. | 36 * default package resolution scheme should be used instead. |
30 */ | 37 */ |
| 38 @deprecated |
31 void set packageResolverProvider(ResolverProvider provider); | 39 void set packageResolverProvider(ResolverProvider provider); |
32 | 40 |
33 /** | 41 /** |
34 * Set the [plugins] that are defined outside the analysis_server package. | 42 * Set the [plugins] that are defined outside the analysis_server package. |
35 */ | 43 */ |
36 void set userDefinedPlugins(List<Plugin> plugins); | 44 void set userDefinedPlugins(List<Plugin> plugins); |
37 | 45 |
38 /** | 46 /** |
39 * Use the given command-line [arguments] to start this server. | 47 * Use the given command-line [arguments] to start this server. |
40 */ | 48 */ |
41 void start(List<String> arguments); | 49 void start(List<String> arguments); |
42 } | 50 } |
OLD | NEW |