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