當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript StatusBarItem.dispose方法代碼示例

本文整理匯總了TypeScript中vscode.StatusBarItem.dispose方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript StatusBarItem.dispose方法的具體用法?TypeScript StatusBarItem.dispose怎麽用?TypeScript StatusBarItem.dispose使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在vscode.StatusBarItem的用法示例。


在下文中一共展示了StatusBarItem.dispose方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: dispose

    dispose() {
        this.clearBlame();

        this._blameStatusBarItem && this._blameStatusBarItem.dispose();
        this._modeStatusBarItem && this._modeStatusBarItem.dispose();

        Container.lineTracker.stop(this);
        this._disposable && this._disposable.dispose();
    }
開發者ID:chrisleaman,項目名稱:vscode-gitlens,代碼行數:9,代碼來源:statusBarController.ts

示例2: dispose

 dispose() {
     if (this._pullRequestStatusBarItem !== undefined) {
         this._pullRequestStatusBarItem.dispose();
     }
     if (this._teamServicesStatusBarItem !== undefined) {
         this._teamServicesStatusBarItem.dispose();
     }
     if (this._buildStatusBarItem !== undefined) {
         this._buildStatusBarItem.dispose();
     }
 }
開發者ID:buckh,項目名稱:vsts-vscode,代碼行數:11,代碼來源:team-extension.ts

示例3: removeStatusBarItem

function removeStatusBarItem() {
    if (statusBarItem) {
        statusBarItem.hide();
        statusBarItem.dispose();
        statusBarItem = null;
    }
    isStatusBarVisible = false;
}
開發者ID:rid9,項目名稱:DateTime,代碼行數:8,代碼來源:extension.ts

示例4: dispose

 dispose() {
     this.statusBarItem.dispose();
 }
開發者ID:scheakur,項目名稱:sandbox,代碼行數:3,代碼來源:extension.ts

示例5: dispose

 dispose()
 {
     this.disposable.dispose();
     this.statusBarItem.dispose();
 }
開發者ID:ciruz,項目名稱:crane,代碼行數:5,代碼來源:crane.ts

示例6: dispose

 public dispose() {
     this._statusBarItem.dispose();
 }
開發者ID:Osuka-Andala,項目名稱:vscode-wordcount,代碼行數:3,代碼來源:extension.ts

示例7: dispose

 dispose() {
     if (this.button !== null) {
         this.button.dispose();
         this.button = null;
     }
 }
開發者ID:AnWeber,項目名稱:vscode-statusbar-command,代碼行數:6,代碼來源:command.ts

示例8: super

		super(() => this.statusBarItem.dispose());
開發者ID:devoncarew,項目名稱:Dart-Code,代碼行數:1,代碼來源:analyzer_status_reporter.ts

示例9: clearState

	private clearState() {
		clearInterval(this._interval);
		this._status.dispose();
	}
開發者ID:Bolisov,項目名稱:vscode-yo,代碼行數:4,代碼來源:yo.ts

示例10: onConfigurationChanged

    private onConfigurationChanged(e: ConfigurationChangeEvent) {
        if (configuration.changed(e, configuration.name('mode').value)) {
            const mode =
                Container.config.mode.active && Container.config.mode.statusBar.enabled
                    ? Container.config.modes[Container.config.mode.active]
                    : undefined;
            if (mode && mode.statusBarItemName) {
                const alignment =
                    Container.config.mode.statusBar.alignment !== 'left'
                        ? StatusBarAlignment.Right
                        : StatusBarAlignment.Left;

                if (configuration.changed(e, configuration.name('mode')('statusBar')('alignment').value)) {
                    if (this._modeStatusBarItem !== undefined && this._modeStatusBarItem.alignment !== alignment) {
                        this._modeStatusBarItem.dispose();
                        this._modeStatusBarItem = undefined;
                    }
                }

                this._modeStatusBarItem =
                    this._modeStatusBarItem ||
                    window.createStatusBarItem(alignment, alignment === StatusBarAlignment.Right ? 999 : 1);
                this._modeStatusBarItem.command = Commands.SwitchMode;
                this._modeStatusBarItem.text = mode.statusBarItemName;
                this._modeStatusBarItem.tooltip = 'Switch GitLens Mode';
                this._modeStatusBarItem.show();
            }
            else if (this._modeStatusBarItem !== undefined) {
                this._modeStatusBarItem.dispose();
                this._modeStatusBarItem = undefined;
            }
        }

        if (!configuration.changed(e, configuration.name('statusBar').value)) return;

        if (Container.config.statusBar.enabled) {
            const alignment =
                Container.config.statusBar.alignment !== 'left' ? StatusBarAlignment.Right : StatusBarAlignment.Left;

            if (configuration.changed(e, configuration.name('statusBar')('alignment').value)) {
                if (this._blameStatusBarItem !== undefined && this._blameStatusBarItem.alignment !== alignment) {
                    this._blameStatusBarItem.dispose();
                    this._blameStatusBarItem = undefined;
                }
            }

            this._blameStatusBarItem =
                this._blameStatusBarItem ||
                window.createStatusBarItem(alignment, alignment === StatusBarAlignment.Right ? 1000 : 0);
            this._blameStatusBarItem.command = Container.config.statusBar.command;

            if (configuration.changed(e, configuration.name('statusBar')('enabled').value)) {
                Container.lineTracker.start(
                    this,
                    Disposable.from(Container.lineTracker.onDidChangeActiveLines(this.onActiveLinesChanged, this))
                );
            }
        }
        else if (configuration.changed(e, configuration.name('statusBar')('enabled').value)) {
            Container.lineTracker.stop(this);

            if (this._blameStatusBarItem !== undefined) {
                this._blameStatusBarItem.dispose();
                this._blameStatusBarItem = undefined;
            }
        }
    }
開發者ID:chrisleaman,項目名稱:vscode-gitlens,代碼行數:67,代碼來源:statusBarController.ts


注:本文中的vscode.StatusBarItem.dispose方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。