This commit is contained in:
Sandeep Somavarapu
2016-09-29 12:41:10 +02:00
parent dcf6d32a6e
commit 54097e0171
6 changed files with 12 additions and 19 deletions

View File

@@ -59,7 +59,7 @@ export interface IExtensionsWorkbenchService {
queryGallery(options?: IQueryOptions): TPromise<IPager<IExtension>>;
canInstall(extension: IExtension): boolean;
install(vsix: string): TPromise<void>;
install(extension: IExtension): TPromise<void>;
install(extension: IExtension, promptToInstallDependencies?: boolean): TPromise<void>;
uninstall(extension: IExtension): TPromise<void>;
}

View File

@@ -337,8 +337,8 @@ export class UpdateAllAction extends Action {
this.getOutdatedExtensions().done(outDated => this.enabled = outDated.length > 0);
}
run(): TPromise<any> {
return this.getOutdatedExtensions().then(outdated => TPromise.join(outdated.map(e => this.extensionsWorkbenchService.install(e))));
run(promptToInstallDependencies: boolean = true,): TPromise<any> {
return this.getOutdatedExtensions().then(outdated => TPromise.join(outdated.map(e => this.extensionsWorkbenchService.install(e, promptToInstallDependencies))));
}
dispose(): void {

View File

@@ -406,7 +406,7 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService {
return TPromise.as(null);
}
return action.run();
return action.run(false);
}
canInstall(extension: IExtension): boolean {
@@ -417,7 +417,7 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService {
return !!(extension as Extension).gallery;
}
install(extension: string | IExtension): TPromise<void> {
install(extension: string | IExtension, promptToInstallDependencies: boolean = true): TPromise<void> {
if (typeof extension === 'string') {
return this.extensionService.install(extension);
}
@@ -433,7 +433,7 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService {
return TPromise.wrapError<void>(new Error('Missing gallery'));
}
return this.extensionService.installFromGallery(gallery);
return this.extensionService.installFromGallery(gallery, promptToInstallDependencies);
}
uninstall(extension: IExtension): TPromise<void> {