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


TypeScript window.onDidChangeTextEditorViewColumn方法代码示例

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


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

示例1: Promise

			await new Promise(resolve => {
				let registration2 = window.onDidChangeTextEditorViewColumn(event => {
					actualEvent = event;
					registration2.dispose();
					resolve();
				});
				// close editor 1, wait a little for the event to bubble
				one.hide();
			});
开发者ID:joelday,项目名称:vscode,代码行数:9,代码来源:window.test.ts

示例2: activate

export function activate(context: ExtensionContext) {
	const status = window.createStatusBarItem(StatusBarAlignment.Right, 100);
	status.command = 'extension.selectedLines';
	context.subscriptions.push(status);

	context.subscriptions.push(window.onDidChangeActiveTextEditor(e => updateStatus(status)));
	context.subscriptions.push(window.onDidChangeTextEditorSelection(e => updateStatus(status)));
	context.subscriptions.push(window.onDidChangeTextEditorViewColumn(e => updateStatus(status)));
	context.subscriptions.push(workspace.onDidOpenTextDocument(e => updateStatus(status)));
	context.subscriptions.push(workspace.onDidCloseTextDocument(e => updateStatus(status)));

	context.subscriptions.push(commands.registerCommand('extension.selectedLines', () => {
		window.showInformationMessage(getSelectedLines());
	}));

	updateStatus(status);
}
开发者ID:rlugojr,项目名称:vscode-extension-samples,代码行数:17,代码来源:extension.ts

示例3: activate

export function activate(context: ExtensionContext) {

    // Create a status bar item
    const status = window.createStatusBarItem(StatusBarAlignment.Left, 1000000);
    context.subscriptions.push(status);

    // Update status bar item based on events for multi root folder changes
    context.subscriptions.push(workspace.onDidChangeWorkspaceFolders(e => updateStatus(status)));

    // Update status bar item based on events for configuration
    context.subscriptions.push(workspace.onDidChangeConfiguration(e => this.updateStatus(status)));

    // Update status bar item based on events around the active editor
    context.subscriptions.push(window.onDidChangeActiveTextEditor(e => updateStatus(status)));
    context.subscriptions.push(window.onDidChangeTextEditorViewColumn(e => updateStatus(status)));
    context.subscriptions.push(workspace.onDidOpenTextDocument(e => updateStatus(status)));
    context.subscriptions.push(workspace.onDidCloseTextDocument(e => updateStatus(status)));

    updateStatus(status);
}
开发者ID:voodoos,项目名称:vscode-extension-samples,代码行数:20,代码来源:extension.ts


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