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