本文整理匯總了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();
}
示例2: dispose
dispose() {
if (this._pullRequestStatusBarItem !== undefined) {
this._pullRequestStatusBarItem.dispose();
}
if (this._teamServicesStatusBarItem !== undefined) {
this._teamServicesStatusBarItem.dispose();
}
if (this._buildStatusBarItem !== undefined) {
this._buildStatusBarItem.dispose();
}
}
示例3: removeStatusBarItem
function removeStatusBarItem() {
if (statusBarItem) {
statusBarItem.hide();
statusBarItem.dispose();
statusBarItem = null;
}
isStatusBarVisible = false;
}
示例4: dispose
dispose() {
this.statusBarItem.dispose();
}
示例5: dispose
dispose()
{
this.disposable.dispose();
this.statusBarItem.dispose();
}
示例6: dispose
public dispose() {
this._statusBarItem.dispose();
}
示例7: dispose
dispose() {
if (this.button !== null) {
this.button.dispose();
this.button = null;
}
}
示例8: super
super(() => this.statusBarItem.dispose());
示例9: clearState
private clearState() {
clearInterval(this._interval);
this._status.dispose();
}
示例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;
}
}
}