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