本文整理汇总了TypeScript中vscode.OutputChannel.show方法的典型用法代码示例。如果您正苦于以下问题:TypeScript OutputChannel.show方法的具体用法?TypeScript OutputChannel.show怎么用?TypeScript OutputChannel.show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vscode.OutputChannel
的用法示例。
在下文中一共展示了OutputChannel.show方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: switch
return result.catch(async err => {
let message: string;
switch (err.gitErrorCode) {
case 'DirtyWorkTree':
message = localize('clean repo', "Please clean your repository working tree before checkout.");
break;
default:
const hint = (err.stderr || err.message || String(err))
.replace(/^error: /mi, '')
.replace(/^> husky.*$/mi, '')
.split(/[\r\n]/)
.filter(line => !!line)
[0];
message = hint
? localize('git error details', "Git: {0}", hint)
: localize('git error', "Git error");
break;
}
if (!message) {
console.error(err);
return;
}
const outputChannel = this.outputChannel as OutputChannel;
const openOutputChannelChoice = localize('open git log', "Open Git Log");
const choice = await window.showErrorMessage(message, openOutputChannelChoice);
if (choice === openOutputChannelChoice) {
outputChannel.show();
}
});
示例3: switch
vscode.window.showErrorMessage(message, 'Disable linter', 'View Errors').then(item => {
switch (item) {
case 'Disable linter': {
disableLinter(this.product);
break;
}
case 'View Errors': {
this.outputChannel.show();
break;
}
}
});
示例4: execPythonFile
execPythonFile(pythonSettings.pythonPath, testArgs, rootDirectory, true, (data: string) => {
if (data.startsWith('READY' + os.EOL)) {
// debug socket server has started.
launchDef.resolve();
data = data.substring(('READY' + os.EOL).length);
}
if (!outputChannelShown) {
outputChannelShown = true;
outChannel.show();
}
outChannel.append(data);
}, token).catch(reason => {
示例5: execPythonFile
execPythonFile(pythonSettings.pythonPath, [testLauncherFile].concat(nosetestlauncherargs).concat(noseTestArgs.concat(testPaths)), rootDirectory, true, (data: string) => {
if (data === 'READY' + os.EOL) {
// debug socket server has started
launchDef.resolve();
}
else {
if (!outputChannelShown) {
outputChannelShown = true;
outChannel.show();
}
outChannel.append(data);
}
}, token).catch(reason => {
示例6: execPythonFile
execPythonFile(command, args, this.workspaceRootPath, this.includeErrorAsResponse).then(data => {
outputChannel.append(data);
outputChannel.show();
}, error => {
示例7: showOutput
@command('git.showOutput')
showOutput(): void {
this.outputChannel.show();
}
示例8: show
public show(): void {
this.channel.show(true);
}
示例9: errorHandler
private errorHandler(error: any) {
this._outputChannel.appendLine(error);
this._outputChannel.show();
window.showErrorMessage("There was an error, please view details in output log");
}
示例10: onFailureFileAccessing
private onFailureFileAccessing(err: Error): void {
outputChannel.show(true);
outputChannel.append("Error has occured by file access.");
}