本文整理匯總了TypeScript中vscode.OutputChannel.clear方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript OutputChannel.clear方法的具體用法?TypeScript OutputChannel.clear怎麽用?TypeScript OutputChannel.clear使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vscode.OutputChannel
的用法示例。
在下文中一共展示了OutputChannel.clear方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: batchExecuteFile
export function batchExecuteFile(
server: Server,
editor: TextEditor,
edit: TextEditorEdit,
args: any[]) {
batchOutputChannel = batchOutputChannel ||
window.createOutputChannel('Lean: Batch File Output');
const fileName = editor.document.fileName;
const executablePath = server.executablePath;
const lean = child.spawn(executablePath, [fileName],
{ cwd: workspace.rootPath, env: {} /* TODO(gabriel): take from server */ });
batchOutputChannel.clear();
carrier.carry(lean.stdout, (line) => {
batchOutputChannel.appendLine(line);
});
carrier.carry(lean.stderr, (line) => {
batchOutputChannel.appendLine(line);
});
lean.on('close', (code) => {
/* not sure if we need to do anything here */
});
batchOutputChannel.show(true);
}
示例2: runCommandInIntegratedTerminal
workspace.saveAll().then(() => {
if (!cwd) {
cwd = workspace.rootPath;
}
if (useTerminal() && !alwaysRunInputWindow) {
if (typeof window.createTerminal === 'function') {
runCommandInIntegratedTerminal(args, cwd);
} else {
runCommandInTerminal(args, cwd);
}
} else {
outputChannel.clear();
runCommandInOutputWindow(args, cwd);
}
});
示例3: clear
public clear(): void {
this.channel.clear();
}