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


TypeScript window.onDidCloseTerminal方法代码示例

本文整理汇总了TypeScript中vscode.window.onDidCloseTerminal方法的典型用法代码示例。如果您正苦于以下问题:TypeScript window.onDidCloseTerminal方法的具体用法?TypeScript window.onDidCloseTerminal怎么用?TypeScript window.onDidCloseTerminal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vscode.window的用法示例。


在下文中一共展示了window.onDidCloseTerminal方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: activate

export function activate(context: vscode.ExtensionContext) {

    const codeManager = new CodeManager();

    vscode.window.onDidCloseTerminal(() => {
        codeManager.onDidCloseTerminal();
    });

    const run = vscode.commands.registerCommand("code-runner.run", (fileUri: vscode.Uri) => {
        codeManager.run(null, fileUri);
    });

    const runCustomCommand = vscode.commands.registerCommand("code-runner.runCustomCommand", () => {
        codeManager.runCustomCommand();
    });

    const runByLanguage = vscode.commands.registerCommand("code-runner.runByLanguage", () => {
        codeManager.runByLanguage();
    });

    const stop = vscode.commands.registerCommand("code-runner.stop", () => {
        codeManager.stop();
    });

    context.subscriptions.push(run);
    context.subscriptions.push(runCustomCommand);
    context.subscriptions.push(runByLanguage);
    context.subscriptions.push(stop);
    context.subscriptions.push(codeManager);
}
开发者ID:formulahendry,项目名称:vscode-code-runner,代码行数:30,代码来源:extension.ts

示例2: test

	test('terminal, onDidCloseTerminal event fires when terminal is disposed', (done) => {
		const terminal = window.createTerminal();
		window.onDidCloseTerminal((eventTerminal) => {
			assert.equal(terminal, eventTerminal);
			done();
		});
		terminal.dispose();
	});
开发者ID:sandy081,项目名称:vscode,代码行数:8,代码来源:window.test.ts

示例3:

				const reg2 = renderer.onDidAcceptInput(data => {
					assert.equal(data, 'bar');
					reg2.dispose();
					const reg3 = window.onDidCloseTerminal(() => {
						reg3.dispose();
						done();
					});
					terminal.dispose();
				});
开发者ID:joelday,项目名称:vscode,代码行数:9,代码来源:window.test.ts

示例4: constructor

    constructor(ip: string) {
        this.interpreterPath = ip;

        vscode.window.onDidCloseTerminal((closedTerminal: vscode.Terminal) => {
            if (this.terminal === closedTerminal) {
                this.terminal = undefined;
            }
        });
    }
开发者ID:karthiknadig,项目名称:RTVS,代码行数:9,代码来源:replTerminal.ts

示例5: activateExecInTerminalProvider

export function activateExecInTerminalProvider(): vscode.Disposable[] {
    const disposables: vscode.Disposable[] = [];
    disposables.push(vscode.commands.registerCommand(Commands.Exec_In_Terminal, execInTerminal));
    disposables.push(vscode.commands.registerCommand(Commands.Exec_Selection_In_Terminal, execSelectionInTerminal));
    disposables.push(vscode.window.onDidCloseTerminal((closedTermina: vscode.Terminal) => {
        if (terminal === closedTermina) {
            terminal = null;
        }
    }));
    return disposables;
}
开发者ID:walkoncross,项目名称:pythonVSCode,代码行数:11,代码来源:execInTerminalProvider.ts

示例6: constructor

 public constructor(
     context: ExtensionContext,
     configuration: Configuration,
     shellProviderManager: ShellProviderManager
 ) {
     this._configuration = configuration;
     this._shellProvider = shellProviderManager;
     context.subscriptions.push(
         window.onDidCloseTerminal(closedTerminal => {
             if (closedTerminal === this._runningTerminal) {
                 this._runningTerminal = undefined;
             }
         })
     );
 }
开发者ID:KalitaAlexey,项目名称:RustyCode,代码行数:15,代码来源:terminal_task_manager.ts

示例7: activate

export function activate(context: vscode.ExtensionContext) {
    const dotnetTestExplorer = new DotnetTestExplorer(context);
    vscode.window.registerTreeDataProvider("dotnetTestExplorer", dotnetTestExplorer);
    AppInsightsClient.sendEvent("loadExtension");

    context.subscriptions.push(vscode.commands.registerCommand("dotnet-test-explorer.refreshTestExplorer", () => {
        dotnetTestExplorer.refreshTestExplorer();
    }));

    context.subscriptions.push(vscode.commands.registerCommand("dotnet-test-explorer.runAllTests", () => {
        dotnetTestExplorer.runAllTests();
    }));

    context.subscriptions.push(vscode.commands.registerCommand("dotnet-test-explorer.runTest", (test) => {
        dotnetTestExplorer.runTest(test.label);
    }));

    context.subscriptions.push(vscode.window.onDidCloseTerminal((closedTerminal: vscode.Terminal) => {
        Executor.onDidCloseTerminal(closedTerminal);
    }));
}
开发者ID:felix-b,项目名称:vscode-dotnet-test-explorer,代码行数:21,代码来源:extension.ts


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