mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
fix tests
This commit is contained in:
parent
105e87186f
commit
62699d7854
|
@ -172,21 +172,19 @@ export class InstallAction extends ExtensionAction {
|
|||
}
|
||||
|
||||
update(): void {
|
||||
this.enabled = false;
|
||||
this.class = InstallAction.Class;
|
||||
this.label = InstallAction.INSTALL_LABEL;
|
||||
if (!this.extension || this.extension.type === ExtensionType.System || this.extension.state === ExtensionState.Installed) {
|
||||
this.enabled = false;
|
||||
this.class = InstallAction.Class;
|
||||
this.label = InstallAction.INSTALL_LABEL;
|
||||
return;
|
||||
}
|
||||
const local = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, this.extension.identifier))[0];
|
||||
if (local && !(local.local && isLanguagePackExtension(local.local.manifest))) {
|
||||
return;
|
||||
}
|
||||
this.enabled = false;
|
||||
if (this.extensionsWorkbenchService.canInstall(this.extension)) {
|
||||
this.enabled = true;
|
||||
this.class = this.extension.state === ExtensionState.Installing ? InstallAction.InstallingClass : InstallAction.Class;
|
||||
this.updateLabel();
|
||||
const local = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, this.extension.identifier))[0];
|
||||
this.enabled = !local || (!!local.local && isLanguagePackExtension(local.local.manifest));
|
||||
}
|
||||
this.class = this.extension.state === ExtensionState.Installing ? InstallAction.InstallingClass : InstallAction.Class;
|
||||
this.updateLabel();
|
||||
}
|
||||
|
||||
private updateLabel(): void {
|
||||
|
|
Loading…
Reference in a new issue