Skip to content

Commit

Permalink
microsoft#45651 Rename reinstall to reinstallFromGallery
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Mar 13, 2018
1 parent 5478bd9 commit 5ceea45
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export interface IExtensionManagementService {
install(zipPath: string): TPromise<ILocalExtension>;
installFromGallery(extension: IGalleryExtension): TPromise<ILocalExtension>;
uninstall(extension: ILocalExtension, force?: boolean): TPromise<void>;
reinstall(extension: ILocalExtension): TPromise<ILocalExtension>;
reinstallFromGallery(extension: ILocalExtension): TPromise<ILocalExtension>;
getInstalled(type?: LocalExtensionType): TPromise<ILocalExtension[]>;
getExtensionsReport(): TPromise<IReportedExtension[]>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface IExtensionManagementChannel extends IChannel {
call(command: 'install', path: string): TPromise<ILocalExtension>;
call(command: 'installFromGallery', extension: IGalleryExtension): TPromise<ILocalExtension>;
call(command: 'uninstall', args: [ILocalExtension, boolean]): TPromise<void>;
call(command: 'reinstall', args: [ILocalExtension]): TPromise<ILocalExtension>;
call(command: 'reinstallFromGallery', args: [ILocalExtension]): TPromise<ILocalExtension>;
call(command: 'getInstalled'): TPromise<ILocalExtension[]>;
call(command: 'getExtensionsReport'): TPromise<IReportedExtension[]>;
call(command: string, arg?: any): TPromise<any>;
Expand Down Expand Up @@ -47,7 +47,7 @@ export class ExtensionManagementChannel implements IExtensionManagementChannel {
case 'install': return this.service.install(arg);
case 'installFromGallery': return this.service.installFromGallery(arg[0]);
case 'uninstall': return this.service.uninstall(arg[0], arg[1]);
case 'reinstall': return this.service.reinstall(arg[0]);
case 'reinstallFromGallery': return this.service.reinstallFromGallery(arg[0]);
case 'getInstalled': return this.service.getInstalled(arg);
case 'updateMetadata': return this.service.updateMetadata(arg[0], arg[1]);
case 'getExtensionsReport': return this.service.getExtensionsReport();
Expand Down Expand Up @@ -86,8 +86,8 @@ export class ExtensionManagementChannelClient implements IExtensionManagementSer
return this.channel.call('uninstall', [extension, force]);
}

reinstall(extension: ILocalExtension): TPromise<ILocalExtension> {
return this.channel.call('reinstall', [extension]);
reinstallFromGallery(extension: ILocalExtension): TPromise<ILocalExtension> {
return this.channel.call('reinstallFromGallery', [extension]);
}

getInstalled(type: LocalExtensionType = null): TPromise<ILocalExtension[]> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
error => this.onDidInstallExtensions([extension], [], [error]));
}

reinstall(extension: ILocalExtension): TPromise<ILocalExtension> {
reinstallFromGallery(extension: ILocalExtension): TPromise<ILocalExtension> {
if (!this.galleryService.isEnabled()) {
return TPromise.wrapError(new Error(nls.localize('MarketPlaceDisabled', "Marketplace is not enabled")));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService {
return this.progressService.withProgress({
location: ProgressLocation.Extensions,
tooltip: `${local.identifier.id}`
}, () => this.extensionService.reinstall(local).then(() => null));
}, () => this.extensionService.reinstallFromGallery(local).then(() => null));
}

private promptAndSetEnablement(extension: IExtension, enablementState: EnablementState, enable: boolean): TPromise<any> {
Expand Down

0 comments on commit 5ceea45

Please sign in to comment.