mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-30 00:30:29 -04:00
Merge from vscode cfbd1999769f4f08dce29629fb92fdc0fac53829
This commit is contained in:
@@ -1111,7 +1111,6 @@ export class CheckForUpdatesAction extends Action {
|
||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||
@IWorkbenchExtensionEnablementService private readonly extensionEnablementService: IWorkbenchExtensionEnablementService,
|
||||
@IViewletService private readonly viewletService: IViewletService,
|
||||
@IDialogService private readonly dialogService: IDialogService,
|
||||
@INotificationService private readonly notificationService: INotificationService
|
||||
) {
|
||||
super(id, label, '', true);
|
||||
@@ -1120,7 +1119,7 @@ export class CheckForUpdatesAction extends Action {
|
||||
private checkUpdatesAndNotify(): void {
|
||||
const outdated = this.extensionsWorkbenchService.outdated;
|
||||
if (!outdated.length) {
|
||||
this.dialogService.show(Severity.Info, localize('noUpdatesAvailable', "All extensions are up to date."), [localize('ok', "OK")]);
|
||||
this.notificationService.info(localize('noUpdatesAvailable', "All extensions are up to date."));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1851,19 +1850,20 @@ export class ShowRecommendedExtensionsAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
export class InstallWorkspaceRecommendedExtensionsAction extends Action {
|
||||
export class InstallRecommendedExtensionsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.installWorkspaceRecommendedExtensions';
|
||||
static readonly LABEL = localize('installWorkspaceRecommendedExtensions', "Install All Workspace Recommended Extensions");
|
||||
static readonly ID = 'workbench.extensions.action.installRecommendedExtensions';
|
||||
static readonly LABEL = localize('installRecommendedExtensions', "Install Recommended Extensions");
|
||||
|
||||
private _recommendations: string[] = [];
|
||||
get recommendations(): string[] { return this._recommendations; }
|
||||
set recommendations(recommendations: string[]) { this._recommendations = recommendations; this.enabled = this._recommendations.length > 0; }
|
||||
|
||||
constructor(
|
||||
id: string = InstallWorkspaceRecommendedExtensionsAction.ID,
|
||||
label: string = InstallWorkspaceRecommendedExtensionsAction.LABEL,
|
||||
id: string,
|
||||
label: string,
|
||||
recommendations: string[],
|
||||
private readonly source: string,
|
||||
@IViewletService private readonly viewletService: IViewletService,
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
@IExtensionsWorkbenchService private readonly extensionWorkbenchService: IExtensionsWorkbenchService,
|
||||
@@ -1882,7 +1882,7 @@ export class InstallWorkspaceRecommendedExtensionsAction extends Action {
|
||||
viewlet.search('@recommended ');
|
||||
viewlet.focus();
|
||||
const names = this.recommendations;
|
||||
return this.extensionWorkbenchService.queryGallery({ names, source: 'install-all-workspace-recommendations' }, CancellationToken.None).then(pager => {
|
||||
return this.extensionWorkbenchService.queryGallery({ names, source: this.source }, CancellationToken.None).then(pager => {
|
||||
let installPromises: Promise<any>[] = [];
|
||||
let model = new PagedModel(pager);
|
||||
for (let i = 0; i < pager.total; i++) {
|
||||
@@ -1914,6 +1914,22 @@ export class InstallWorkspaceRecommendedExtensionsAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
export class InstallWorkspaceRecommendedExtensionsAction extends InstallRecommendedExtensionsAction {
|
||||
|
||||
constructor(
|
||||
recommendations: string[],
|
||||
@IViewletService viewletService: IViewletService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IExtensionsWorkbenchService extensionWorkbenchService: IExtensionsWorkbenchService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IExtensionManagementServerService extensionManagementServerService: IExtensionManagementServerService,
|
||||
@IProductService productService: IProductService,
|
||||
) {
|
||||
super('workbench.extensions.action.installWorkspaceRecommendedExtensions', localize('installWorkspaceRecommendedExtensions', "Install Workspace Recommended Extensions"), recommendations, 'install-all-workspace-recommendations',
|
||||
viewletService, instantiationService, extensionWorkbenchService, configurationService, extensionManagementServerService, productService);
|
||||
}
|
||||
}
|
||||
|
||||
export class ShowRecommendedExtensionAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.showRecommendedExtension';
|
||||
@@ -2807,7 +2823,7 @@ export class SyncIgnoredIconAction extends ExtensionAction {
|
||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||
) {
|
||||
super('extensions.syncignore', '', SyncIgnoredIconAction.DISABLE_CLASS, false);
|
||||
this._register(Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectedKeys.includes('sync.ignoredExtensions'))(() => this.update()));
|
||||
this._register(Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectedKeys.includes('settingsSync.ignoredExtensions'))(() => this.update()));
|
||||
this.update();
|
||||
this.tooltip = localize('syncingore.label', "This extension is ignored during sync.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user