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

Unified Diff: pkg/fletchc/lib/src/verbs/show_verb.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/fletchc/lib/src/verbs/run_verb.dart ('k') | pkg/fletchc/lib/src/verbs/x_download_tools_verb.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fletchc/lib/src/verbs/show_verb.dart
diff --git a/pkg/fletchc/lib/src/verbs/show_verb.dart b/pkg/fletchc/lib/src/verbs/show_verb.dart
deleted file mode 100644
index 734cb78f1eca329ebaddb3e4caf7e1c538077872..0000000000000000000000000000000000000000
--- a/pkg/fletchc/lib/src/verbs/show_verb.dart
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE.md file.
-
-library fletchc.verbs.show_verb;
-
-import 'infrastructure.dart';
-
-import 'documentation.dart' show
- showDocumentation;
-
-import '../diagnostic.dart' show
- throwInternalError;
-
-import '../worker/developer.dart' show
- discoverDevices,
- showSessions,
- showSessionSettings;
-
-const Action showAction = const Action(
- show, showDocumentation, requiresSession: true,
- requiresTarget: true,
- supportedTargets: const <TargetKind>[
- TargetKind.DEVICES,
- TargetKind.LOG,
- TargetKind.SESSIONS,
- TargetKind.SETTINGS,
- ]);
-
-Future<int> show(AnalyzedSentence sentence, VerbContext context) {
- switch (sentence.target.kind) {
- case TargetKind.LOG:
- return context.performTaskInWorker(const ShowLogTask());
- case TargetKind.DEVICES:
- return context.performTaskInWorker(const ShowDevicesTask());
- case TargetKind.SESSIONS:
- showSessions();
- return new Future.value(0);
- case TargetKind.SETTINGS:
- return context.performTaskInWorker(const ShowSettingsTask());
- default:
- throwInternalError("Unexpected ${sentence.target}");
- }
-}
-
-class ShowLogTask extends SharedTask {
- // Keep this class simple, see note in superclass.
-
- const ShowLogTask();
-
- Future<int> call(
- CommandSender commandSender,
- StreamIterator<ClientCommand> commandIterator) {
- return showLogTask();
- }
-}
-
-Future<int> showLogTask() async {
- print(SessionState.current.getLog());
- return 0;
-}
-
-class ShowDevicesTask extends SharedTask {
- // Keep this class simple, see note in superclass.
-
- const ShowDevicesTask();
-
- Future<int> call(
- CommandSender commandSender,
- StreamIterator<ClientCommand> commandIterator) {
- return showDevicesTask();
- }
-}
-
-Future<int> showDevicesTask() async {
- await discoverDevices();
- return 0;
-}
-
-class ShowSettingsTask extends SharedTask {
- // Keep this class simple, see note in superclass.
-
- const ShowSettingsTask();
-
- Future<int> call(
- CommandSender commandSender,
- StreamIterator<ClientCommand> commandIterator) async {
- return await showSessionSettings();
- }
-}
« no previous file with comments | « pkg/fletchc/lib/src/verbs/run_verb.dart ('k') | pkg/fletchc/lib/src/verbs/x_download_tools_verb.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698