OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 library fletchc.verbs.x_download_tools_verb; | 5 library dartino_compiler.verbs.x_download_tools_verb; |
6 | 6 |
7 import 'infrastructure.dart'; | 7 import 'infrastructure.dart'; |
8 import '../worker/developer.dart' show downloadTools; | 8 import '../worker/developer.dart' show downloadTools; |
9 import 'documentation.dart' show downloadToolsDocumentation; | 9 import 'documentation.dart' show downloadToolsDocumentation; |
10 | 10 |
11 const Action downloadToolsAction = const Action( | 11 const Action downloadToolsAction = const Action( |
12 downloadToolsFunction, downloadToolsDocumentation, | 12 downloadToolsFunction, downloadToolsDocumentation, |
13 requiresSession: true); | 13 requiresSession: true); |
14 | 14 |
15 Future downloadToolsFunction( | 15 Future downloadToolsFunction( |
16 AnalyzedSentence sentence, VerbContext context) async { | 16 AnalyzedSentence sentence, VerbContext context) async { |
17 return context.performTaskInWorker(new DownloadTooksTask()); | 17 return context.performTaskInWorker(new DownloadTooksTask()); |
18 } | 18 } |
19 | 19 |
20 class DownloadTooksTask extends SharedTask { | 20 class DownloadTooksTask extends SharedTask { |
21 | 21 |
22 DownloadTooksTask(); | 22 DownloadTooksTask(); |
23 | 23 |
24 Future call( | 24 Future call( |
25 CommandSender commandSender, | 25 CommandSender commandSender, |
26 StreamIterator<ClientCommand> commandIterator) async { | 26 StreamIterator<ClientCommand> commandIterator) async { |
27 return await downloadTools( | 27 return await downloadTools( |
28 commandSender, commandIterator, SessionState.current); | 28 commandSender, commandIterator, SessionState.current); |
29 } | 29 } |
30 } | 30 } |
OLD | NEW |