Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: pkg/analysis_server/lib/starter.dart

Issue 1214243005: Hook for overriding the creation of a package resolver (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Finish the thought Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/server/driver.dart'; 7 import 'package:analysis_server/src/server/driver.dart';
8 import 'package:analysis_server/uri/resolver_provider.dart';
8 import 'package:analyzer/instrumentation/instrumentation.dart'; 9 import 'package:analyzer/instrumentation/instrumentation.dart';
9 import 'package:plugin/plugin.dart'; 10 import 'package:plugin/plugin.dart';
10 11
11 /** 12 /**
12 * An object that can be used to start an analysis server. 13 * An object that can be used to start an analysis server.
13 */ 14 */
14 abstract class ServerStarter { 15 abstract class ServerStarter {
15 /** 16 /**
16 * Initialize a newly created starter to start up an analysis server. 17 * Initialize a newly created starter to start up an analysis server.
17 */ 18 */
18 factory ServerStarter() = Driver; 19 factory ServerStarter() = Driver;
19 20
20 /** 21 /**
21 * Set the instrumentation [server] that is to be used by the analysis server. 22 * Set the instrumentation [server] that is to be used by the analysis server.
22 */ 23 */
23 void set instrumentationServer(InstrumentationServer server); 24 void set instrumentationServer(InstrumentationServer server);
24 25
25 /** 26 /**
27 * 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
29 * default package resolution scheme should be used instead.
30 */
31 void set packageResolverProvider(ResolverProvider provider);
32
33 /**
26 * Set the [plugins] that are defined outside the analysis_server package. 34 * Set the [plugins] that are defined outside the analysis_server package.
27 */ 35 */
28 void set userDefinedPlugins(List<Plugin> plugins); 36 void set userDefinedPlugins(List<Plugin> plugins);
29 37
30 /** 38 /**
31 * Use the given command-line [arguments] to start this server. 39 * Use the given command-line [arguments] to start this server.
32 */ 40 */
33 void start(List<String> arguments); 41 void start(List<String> arguments);
34 } 42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698