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