| 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 analysis_server.starter; | 5 library analysis_server.starter; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/server/driver.dart'; | 7 import 'package:analysis_server/src/server/driver.dart'; |
| 8 import 'package:analyzer/instrumentation/instrumentation.dart'; | 8 import 'package:analyzer/instrumentation/instrumentation.dart'; |
| 9 import 'package:analyzer/plugin/embedded_resolver_provider.dart'; | |
| 10 import 'package:analyzer/plugin/resolver_provider.dart'; | 9 import 'package:analyzer/plugin/resolver_provider.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. This class exists so | 13 * An object that can be used to start an analysis server. This class exists so |
| 15 * that clients can configure an analysis server before starting it. | 14 * that clients can configure an analysis server before starting it. |
| 16 * | 15 * |
| 17 * Clients may not extend, implement or mix-in this class. | 16 * Clients may not extend, implement or mix-in this class. |
| 18 */ | 17 */ |
| 19 abstract class ServerStarter { | 18 abstract class ServerStarter { |
| 20 /** | 19 /** |
| 21 * Initialize a newly created starter to start up an analysis server. | 20 * Initialize a newly created starter to start up an analysis server. |
| 22 */ | 21 */ |
| 23 factory ServerStarter() = Driver; | 22 factory ServerStarter() = Driver; |
| 24 | 23 |
| 25 /** | 24 /** |
| 26 * Set the embedded resolver provider used to override the way embedded | |
| 27 * library URI's are resolved in some contexts. The provider should return | |
| 28 * `null` if the embedded library URI resolution scheme should be used | |
| 29 * instead. | |
| 30 */ | |
| 31 void set embeddedUriResolverProvider(EmbeddedResolverProvider provider); | |
| 32 | |
| 33 /** | |
| 34 * Set the instrumentation [server] that is to be used by the analysis server. | 25 * Set the instrumentation [server] that is to be used by the analysis server. |
| 35 */ | 26 */ |
| 36 void set instrumentationServer(InstrumentationServer server); | 27 void set instrumentationServer(InstrumentationServer server); |
| 37 | 28 |
| 38 /** | 29 /** |
| 39 * Set the package resolver provider used to override the way package URI's | 30 * Set the package resolver provider used to override the way package URI's |
| 40 * are resolved in some contexts. The provider should return `null` if the | 31 * are resolved in some contexts. The provider should return `null` if the |
| 41 * default package resolution scheme should be used instead. | 32 * default package resolution scheme should be used instead. |
| 42 */ | 33 */ |
| 43 void set packageResolverProvider(ResolverProvider provider); | 34 void set packageResolverProvider(ResolverProvider provider); |
| 44 | 35 |
| 45 /** | 36 /** |
| 46 * Set the [plugins] that are defined outside the analysis_server package. | 37 * Set the [plugins] that are defined outside the analysis_server package. |
| 47 */ | 38 */ |
| 48 void set userDefinedPlugins(List<Plugin> plugins); | 39 void set userDefinedPlugins(List<Plugin> plugins); |
| 49 | 40 |
| 50 /** | 41 /** |
| 51 * Use the given command-line [arguments] to start this server. | 42 * Use the given command-line [arguments] to start this server. |
| 52 */ | 43 */ |
| 53 void start(List<String> arguments); | 44 void start(List<String> arguments); |
| 54 } | 45 } |
| OLD | NEW |