fix tests

This commit is contained in:
Sandeep Somavarapu 2019-04-17 17:51:51 +02:00
parent 105e87186f
commit 62699d7854

View file

@ -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 {