當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。