当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript OutputChannel.show方法代码示例

本文整理汇总了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);
}
开发者ID:bryangingechen,项目名称:vscode-lean,代码行数:31,代码来源:batch.ts

示例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();
				}
			});
开发者ID:m-khosravi,项目名称:vscode,代码行数:35,代码来源:commands.ts

示例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;
         }
     }
 });
开发者ID:,项目名称:,代码行数:12,代码来源:

示例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 => {
开发者ID:,项目名称:,代码行数:13,代码来源:

示例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 => {
开发者ID:walkoncross,项目名称:pythonVSCode,代码行数:13,代码来源:runner.ts

示例6: execPythonFile

 execPythonFile(command, args, this.workspaceRootPath, this.includeErrorAsResponse).then(data => {
     outputChannel.append(data);
     outputChannel.show();
 }, error => {
开发者ID:SongJLG,项目名称:pythonVSCode,代码行数:4,代码来源:baseTestRunner.ts

示例7: showOutput

	@command('git.showOutput')
	showOutput(): void {
		this.outputChannel.show();
	}
开发者ID:golf1052,项目名称:vscode,代码行数:4,代码来源:commands.ts

示例8: show

 public show(): void {
     this.channel.show(true);
 }
开发者ID:KalitaAlexey,项目名称:RustyCode,代码行数:3,代码来源:output_channel_wrapper.ts

示例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");
 }
开发者ID:928PJY,项目名称:vscode-restclient,代码行数:5,代码来源:historyController.ts

示例10: onFailureFileAccessing

 private onFailureFileAccessing(err: Error): void {
   outputChannel.show(true);
   outputChannel.append("Error has occured by file access.");
 }
开发者ID:misoton665,项目名称:BellTerm,代码行数:4,代码来源:bellterm.ts


注:本文中的vscode.OutputChannel.show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。