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

Unified Diff: pkg/fletchc/lib/src/verbs/create_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/compile_verb.dart ('k') | pkg/fletchc/lib/src/verbs/debug_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/create_verb.dart
diff --git a/pkg/fletchc/lib/src/verbs/create_verb.dart b/pkg/fletchc/lib/src/verbs/create_verb.dart
deleted file mode 100644
index 01b195c6bc0e91222d756296329184fdd922f90c..0000000000000000000000000000000000000000
--- a/pkg/fletchc/lib/src/verbs/create_verb.dart
+++ /dev/null
@@ -1,76 +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.create_verb;
-
-import 'infrastructure.dart';
-
-import '../worker/developer.dart' show
- Settings,
- allocateWorker,
- configFileUri,
- createSessionState,
- createSettings;
-
-import 'documentation.dart' show
- createDocumentation;
-
-const Action createAction = const Action(
- create, createDocumentation, requiresTargetSession: true,
- supportsWithUri: true);
-
-Future<int> create(AnalyzedSentence sentence, VerbContext context) async {
- IsolatePool pool = context.pool;
- String name = sentence.targetName;
-
- UserSession session = await createSession(name, () => allocateWorker(pool));
-
- context = context.copyWithSession(session);
-
- return await context.performTaskInWorker(
- new CreateSessionTask(
- name, sentence.withUri, sentence.base, configFileUri));
-}
-
-class CreateSessionTask extends SharedTask {
- // Keep this class simple, see note in superclass.
-
- final String name;
-
- final Uri settingsUri;
-
- final Uri base;
-
- final Uri configFileUri;
-
- const CreateSessionTask(
- this.name, this.settingsUri, this.base, this.configFileUri);
-
- Future<int> call(
- CommandSender commandSender,
- StreamIterator<ClientCommand> commandIterator) {
- return createSessionTask(
- commandSender, commandIterator, name, settingsUri, base, configFileUri);
- }
-}
-
-Future<int> createSessionTask(
- CommandSender commandSender,
- StreamIterator<ClientCommand> commandIterator,
- String name,
- Uri settingsUri,
- Uri base,
- Uri configFileUri) async {
- assert(SessionState.internalCurrent == null);
- Settings settings = await createSettings(
- name, settingsUri, base, configFileUri, commandSender, commandIterator);
- SessionState state = createSessionState(name, settings);
- SessionState.internalCurrent = state;
- if (settingsUri != null) {
- state.log("created session with $settingsUri $settings");
- } else {
- state.log("created session with settings $settings");
- }
- return 0;
-}
« no previous file with comments | « pkg/fletchc/lib/src/verbs/compile_verb.dart ('k') | pkg/fletchc/lib/src/verbs/debug_verb.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698