Move run_single into runnables

This commit is contained in:
Jeremy Kolb
2019-01-12 13:54:08 -05:00
parent 72d48b08fb
commit 5bf739c824
4 changed files with 17 additions and 66 deletions

View File

@@ -103,3 +103,19 @@ export async function handle() {
return await vscode.tasks.executeTask(task);
}
}
export async function handleSingle(runnable: Runnable) {
const editor = vscode.window.activeTextEditor;
if (editor == null || editor.document.languageId !== 'rust') {
return;
}
const task = createTask(runnable);
task.group = vscode.TaskGroup.Build;
task.presentationOptions = {
reveal: vscode.TaskRevealKind.Always,
panel: vscode.TaskPanelKind.Dedicated,
};
return vscode.tasks.executeTask(task);
}