| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'dart:isolate'; | 5 import 'dart:isolate'; |
| 6 | 6 |
| 7 import 'package:analyzer_plugin/plugin/plugin.dart'; | 7 import 'package:analyzer_plugin/plugin/plugin.dart'; |
| 8 import 'package:analyzer_plugin/src/channel/isolate_channel.dart'; | 8 import 'package:analyzer_plugin/src/channel/isolate_channel.dart'; |
| 9 import 'package:analyzer_plugin/starter.dart'; | 9 import 'package:analyzer_plugin/starter.dart'; |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * The [Driver] class represents a single running instance of an analysis | 12 * The [Driver] class represents a single running instance of an analysis |
| 13 * server plugin. It is responsible for handling the communications with the | 13 * server plugin. It is responsible for handling the communications with the |
| 14 * server and forwarding requests on to the plugin. | 14 * server and forwarding requests on to the plugin. |
| 15 */ | 15 */ |
| 16 class Driver implements ServerPluginStarter { | 16 class Driver implements ServerPluginStarter { |
| 17 /** | 17 /** |
| 18 * The plugin that will be started. | 18 * The plugin that will be started. |
| 19 */ | 19 */ |
| 20 final ServerPlugin plugin; | 20 final ServerPlugin plugin; |
| 21 | 21 |
| 22 /** | 22 /** |
| 23 * Initialize a newly created driver that can be used to start the given | 23 * Initialize a newly created driver that can be used to start the given |
| 24 * plugin. | 24 * plugin. |
| 25 */ | 25 */ |
| 26 Driver(this.plugin); | 26 Driver(this.plugin); |
| 27 | 27 |
| 28 @override | 28 @override |
| 29 void start(SendPort sendPort) { | 29 void start(SendPort sendPort) { |
| 30 IsolateChannel channel = new IsolateChannel(sendPort); | 30 PluginIsolateChannel channel = new PluginIsolateChannel(sendPort); |
| 31 plugin.start(channel); | 31 plugin.start(channel); |
| 32 } | 32 } |
| 33 } | 33 } |
| OLD | NEW |