本文整理汇总了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();
}