From 5a979b5480a943d279e80a9fbce481a9b20f144a Mon Sep 17 00:00:00 2001 From: chriswang521 Date: Thu, 17 Aug 2023 17:22:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=95=86=E5=BA=97=E5=9C=B0=E5=9D=80=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=80=89=E9=A1=B9,=E5=90=AB=E6=9C=89serviceUrl?= =?UTF-8?q?=E5=92=8CitemUrl=E9=85=8D=E7=BD=AE.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../translations/main.i18n.json | 9 ++ .../sharedProcess/sharedProcessMain.ts | 7 ++ src/vs/code/node/cliProcessMain.ts | 3 + .../common/extensionGalleryService.ts | 26 +++++- .../extensionsGallery.config.contribution.ts | 43 +++++++++ .../common/extensionsGalleryConfig.ts | 87 +++++++++++++++++++ .../common/extensionsGalleryConfigService.ts | 15 ++++ src/vs/server/node/serverServices.ts | 3 + .../extensions/browser/extensionsActions.ts | 12 ++- .../browser/extensionsWorkbenchService.ts | 12 ++- .../preferences/browser/settingsLayout.ts | 5 ++ .../update/browser/update.contribution.ts | 1 + src/vs/workbench/workbench.common.main.ts | 3 + 13 files changed, 220 insertions(+), 6 deletions(-) create mode 100644 src/vs/platform/extensionsGallery/common/extensionsGallery.config.contribution.ts create mode 100644 src/vs/platform/extensionsGallery/common/extensionsGalleryConfig.ts create mode 100644 src/vs/platform/extensionsGallery/common/extensionsGalleryConfigService.ts diff --git a/extensions/vscode-language-pack-zh-hans/translations/main.i18n.json b/extensions/vscode-language-pack-zh-hans/translations/main.i18n.json index 2a1fabe5..bb0506e8 100644 --- a/extensions/vscode-language-pack-zh-hans/translations/main.i18n.json +++ b/extensions/vscode-language-pack-zh-hans/translations/main.i18n.json @@ -1544,6 +1544,14 @@ "versionSpecificity2": "\"engines.vscode\" ({0}) 中指定的版本不够具体。对于 1.0.0 之后的 vscode 版本,请至少定义主要想要的版本。例如: ^1.10.0、1.10.x、1.x.x、2.x.x 等。", "versionSyntax": "无法解析 \"engines.vscode\" 的值 {0}。请改为如 ^1.22.0, ^1.22.x 等。" }, + "vs/platform/extensionsGallery/common/extensionsGallery.config.contribution":{ + "extensionsGalleryConfigurationTitle":"插件商店地址", + "extensionsGalleryServiceUrl":"配置插件商店的服务器地址serviceUrl。例如:https://open-vsx.org/vscode/gallery", + "extensionsGalleryItemUrl":"配置插件商店的单个插件地址itemUrl。例如:https://open-vsx.org/vscode/item" + }, + "vs/platform/extensionsGallery/common/extensionsGalleryConfig":{ + "galleryConfigChanged":"插件商店配置地址已更改。" + }, "vs/platform/externalTerminal/node/externalTerminalService": { "console.title": "VS Code 控制台", "ext.term.app.not.found": "找不到终端应用程序 \"{0}\"", @@ -7364,6 +7372,7 @@ "diffEditor": "差异编辑器", "editorManagement": "编辑管理", "extensions": "插件", + "extensionsGallery":"插件商店地址", "features": "功能", "fileExplorer": "资源管理器", "files": "文件", diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts index 3d5d20b8..b6a77b17 100644 --- a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts +++ b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts @@ -102,6 +102,10 @@ import { IExtensionsScannerService } from 'vs/platform/extensionManagement/commo import { ExtensionsScannerService } from 'vs/platform/extensionManagement/node/extensionsScannerService'; import { PolicyChannelClient } from 'vs/platform/policy/common/policyIpc'; import { IPolicyService, NullPolicyService } from 'vs/platform/policy/common/policy'; +import { IExtensionsGalleryConfigService } from 'vs/platform/extensionsGallery/common/extensionsGalleryConfigService'; +import { ExtensionsGalleryConfigService } from 'vs/platform/extensionsGallery/common/extensionsGalleryConfig'; +import { NotificationService } from 'vs/workbench/services/notification/common/notificationService'; +import { INotificationService } from 'vs/platform/notification/common/notification'; class SharedProcessMain extends Disposable { @@ -304,6 +308,9 @@ class SharedProcessMain extends Disposable { services.set(IExtensionsScannerService, new SyncDescriptor(ExtensionsScannerService)); services.set(IExtensionManagementService, new SyncDescriptor(ExtensionManagementService)); + + services.set(INotificationService, new SyncDescriptor(NotificationService)); + services.set(IExtensionsGalleryConfigService, new SyncDescriptor(ExtensionsGalleryConfigService)); // Extension Gallery services.set(IExtensionGalleryService, new SyncDescriptor(ExtensionGalleryService)); diff --git a/src/vs/code/node/cliProcessMain.ts b/src/vs/code/node/cliProcessMain.ts index 32d5fb9c..2ba5efa2 100644 --- a/src/vs/code/node/cliProcessMain.ts +++ b/src/vs/code/node/cliProcessMain.ts @@ -29,6 +29,8 @@ import { ExtensionManagementCLIService } from 'vs/platform/extensionManagement/c import { IExtensionsScannerService } from 'vs/platform/extensionManagement/common/extensionsScannerService'; import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService'; import { ExtensionsScannerService } from 'vs/platform/extensionManagement/node/extensionsScannerService'; +import { ExtensionsGalleryConfigService } from 'vs/platform/extensionsGallery/common/extensionsGalleryConfig'; +import { IExtensionsGalleryConfigService } from 'vs/platform/extensionsGallery/common/extensionsGalleryConfigService'; import { IFileService } from 'vs/platform/files/common/files'; import { FileService } from 'vs/platform/files/common/fileService'; import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider'; @@ -155,6 +157,7 @@ class CliMain extends Disposable { services.set(IDownloadService, new SyncDescriptor(DownloadService)); // Extensions + services.set(IExtensionsGalleryConfigService, new SyncDescriptor(ExtensionsGalleryConfigService)); services.set(IExtensionsScannerService, new SyncDescriptor(ExtensionsScannerService)); services.set(IExtensionManagementService, new SyncDescriptor(ExtensionManagementService)); services.set(IExtensionGalleryService, new SyncDescriptor(ExtensionGalleryServiceWithNoStorageService)); diff --git a/src/vs/platform/extensionManagement/common/extensionGalleryService.ts b/src/vs/platform/extensionManagement/common/extensionGalleryService.ts index b392af1f..914b19bb 100644 --- a/src/vs/platform/extensionManagement/common/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/common/extensionGalleryService.ts @@ -27,6 +27,7 @@ import { asJson, asTextOrError, IRequestService, isSuccess } from 'vs/platform/r import { resolveMarketplaceHeaders } from 'vs/platform/externalServices/common/marketplace'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +import { IExtensionsGalleryConfigService } from 'vs/platform/extensionsGallery/common/extensionsGalleryConfigService'; const CURRENT_TARGET_PLATFORM = isWeb ? TargetPlatform.WEB : getTargetPlatform(platform, arch); @@ -581,13 +582,30 @@ abstract class AbstractExtensionGalleryService implements IExtensionGalleryServi @IFileService private readonly fileService: IFileService, @IProductService private readonly productService: IProductService, @IConfigurationService private readonly configurationService: IConfigurationService, + @IExtensionsGalleryConfigService readonly extensionsGalleryConfigService: IExtensionsGalleryConfigService, + ) { const config = productService.extensionsGallery; - this.extensionsGalleryUrl = config && config.serviceUrl; + if (extensionsGalleryConfigService && extensionsGalleryConfigService.serviceUrl) { + this.extensionsGalleryUrl = extensionsGalleryConfigService.serviceUrl; + } else { + this.extensionsGalleryUrl = config && config.serviceUrl; + } + this.extensionsGalleryConfigService!.onConfigChange!(this.onUpdateConfigChange, this); this.extensionsControlUrl = config && config.controlUrl; this.commonHeadersPromise = resolveMarketplaceHeaders(productService.version, productService, this.environmentService, this.configurationService, this.fileService, storageService); } + private onUpdateConfigChange(serverURL: string) { + this.logService.info('wpl onUpdateConfigChange serverURL:' + serverURL); + if (serverURL) { + this.extensionsGalleryUrl = serverURL; + } else { + const config = this.productService.extensionsGallery; + this.extensionsGalleryUrl = config && config.serviceUrl; + } + } + private api(path = ''): string { return `${this.extensionsGalleryUrl}${path}`; } @@ -1223,8 +1241,9 @@ export class ExtensionGalleryService extends AbstractExtensionGalleryService { @IFileService fileService: IFileService, @IProductService productService: IProductService, @IConfigurationService configurationService: IConfigurationService, + @IExtensionsGalleryConfigService extensionsGalleryConfigService: IExtensionsGalleryConfigService, ) { - super(storageService, requestService, logService, environmentService, telemetryService, fileService, productService, configurationService); + super(storageService, requestService, logService, environmentService, telemetryService, fileService, productService, configurationService, extensionsGalleryConfigService); } } @@ -1238,7 +1257,8 @@ export class ExtensionGalleryServiceWithNoStorageService extends AbstractExtensi @IFileService fileService: IFileService, @IProductService productService: IProductService, @IConfigurationService configurationService: IConfigurationService, + @IExtensionsGalleryConfigService extensionsGalleryConfigService: IExtensionsGalleryConfigService, ) { - super(undefined, requestService, logService, environmentService, telemetryService, fileService, productService, configurationService); + super(undefined, requestService, logService, environmentService, telemetryService, fileService, productService, configurationService, extensionsGalleryConfigService); } } diff --git a/src/vs/platform/extensionsGallery/common/extensionsGallery.config.contribution.ts b/src/vs/platform/extensionsGallery/common/extensionsGallery.config.contribution.ts new file mode 100644 index 00000000..a13d92c9 --- /dev/null +++ b/src/vs/platform/extensionsGallery/common/extensionsGallery.config.contribution.ts @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) kylinIDETeam. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { localize } from 'vs/nls'; +import { ConfigurationScope, Extensions as ConfigurationExtensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; +import { Registry } from 'vs/platform/registry/common/platform'; + +const configurationRegistry = Registry.as(ConfigurationExtensions.Configuration); +configurationRegistry.registerConfiguration({ + id: 'extensionsGallery', + order: 199, + title: localize('extensionsGalleryConfigurationTitle', "extensionsGallery"), + type: 'object', + properties: { + 'extensionsGallery.serviceUrl': { + type: 'string', + pattern: '^(http|https)?://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$', + default: '', + scope: ConfigurationScope.APPLICATION, + description: localize('extensionsGalleryServiceUrl', "Configure Extensions Gallery ServiceUrl.Sample:https://open-vsx.org/vscode/gallery"), + restricted: true + }, + 'extensionsGallery.itemUrl': { + type: 'string', + pattern: '^(http|https)?://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$', + default: '', + scope: ConfigurationScope.APPLICATION, + description: localize('extensionsGalleryItemUrl', "Configure Extensions Gallery ItemUrl.Sample:https://open-vsx.org/vscode/item"), + restricted: true, + + } + }, +}); + +export interface IExtensionsGalleryConfiguration { + // extensionsGallery?: { + serviceUrl: string; + itemUrl: string; + // } + +} diff --git a/src/vs/platform/extensionsGallery/common/extensionsGalleryConfig.ts b/src/vs/platform/extensionsGallery/common/extensionsGalleryConfig.ts new file mode 100644 index 00000000..dab506dd --- /dev/null +++ b/src/vs/platform/extensionsGallery/common/extensionsGalleryConfig.ts @@ -0,0 +1,87 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) kylinIDETeam. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +// import { Action } from 'vs/base/common/actions'; +// import { isWeb } from 'vs/base/common/platform'; +import { localize } from 'vs/nls'; +import { Emitter, Event } from 'vs/base/common/event'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IExtensionsGalleryConfiguration } from 'vs/platform/extensionsGallery/common/extensionsGallery.config.contribution'; +import { IExtensionsGalleryConfigService } from 'vs/platform/extensionsGallery/common/extensionsGalleryConfigService'; +import { INotificationService } from 'vs/platform/notification/common/notification'; +// import { IHostService } from 'vs/workbench/services/host/browser/host'; + +export class ExtensionsGalleryConfigService implements IExtensionsGalleryConfigService { + declare readonly _serviceBrand: undefined; + private _serviceUrl: string = ''; + private _itemUrl: string = ''; + public extensionsGalleryConfiguration!: IExtensionsGalleryConfiguration; + private preExtensionsGalleryConfig: IExtensionsGalleryConfiguration; + + private readonly _onConfigChange = new Emitter(); + readonly onConfigChange: Event = this._onConfigChange.event; + + constructor( + @IConfigurationService private readonly configurationService: IConfigurationService, + @INotificationService private readonly notificationService: INotificationService, + // @IHostService private readonly hostService: IHostService, + ) { + this.preExtensionsGalleryConfig = this.configurationService.getValue('extensionsGallery'); + + this.updateURL(this.preExtensionsGalleryConfig); + this.configurationService.onDidChangeConfiguration(() => this.configure(this.configurationService.getValue('extensionsGallery')), this); + } + + get serviceUrl(): string { + return this._serviceUrl; + } + get itemUrl(): string { + return this._itemUrl; + } + private updateURL(extensionsGalleryConfig: IExtensionsGalleryConfiguration) { + if (extensionsGalleryConfig) { + this._serviceUrl = extensionsGalleryConfig.serviceUrl; + this._itemUrl = extensionsGalleryConfig.itemUrl; + } + } + + private configure(extensionsGalleryConfig: IExtensionsGalleryConfiguration) { + //不能直接使用==判断,可以将内容转为json的比较,必须序列一致 + if (JSON.stringify(this.preExtensionsGalleryConfig) === JSON.stringify(extensionsGalleryConfig)) { + //前一次和本次修改一致,不做任何操作 + } else { + this.preExtensionsGalleryConfig = extensionsGalleryConfig; + this.updateURL(extensionsGalleryConfig); + // if (extensionsGalleryConfig.serviceUrl) { + // this._serviceUrl = extensionsGalleryConfig!.serviceUrl!; + // this._itemUrl = extensionsGalleryConfig.itemUrl; + this._onConfigChange.fire(this._serviceUrl ? this._serviceUrl : ''); + + this.notificationService.info(localize('galleryConfigChanged', "Extensions Gallery Config Changed")); + + // this.notificationService.prompt( + // Severity.Info, + // "changed testing", + // [ + // { + // label: isWeb ? localize('reload', "Reload") : localize('restart', "Restart"), + // run: () => this.hostService.restart() + // } + // ] + // ); + + // this.notificationService.notify({ + // severity: Severity.Info, + // message: "satest", + // actions: { + // primary: [ + // new Action('Restart', isWeb ? localize('reload', "Reload") : localize('restart', "Restart"), undefined, true, () => this.hostService.restart()) + // ] + // } + // }); + // } + } + } +} diff --git a/src/vs/platform/extensionsGallery/common/extensionsGalleryConfigService.ts b/src/vs/platform/extensionsGallery/common/extensionsGalleryConfigService.ts new file mode 100644 index 00000000..b2339192 --- /dev/null +++ b/src/vs/platform/extensionsGallery/common/extensionsGalleryConfigService.ts @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) kylinIDETeam. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import { Event } from 'vs/base/common/event'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; + +export const IExtensionsGalleryConfigService = createDecorator('extensionsGalleryConfigService'); + +export interface IExtensionsGalleryConfigService { + readonly serviceUrl: string; + readonly itemUrl: string; + readonly _serviceBrand: undefined; + readonly onConfigChange: Event; +} diff --git a/src/vs/server/node/serverServices.ts b/src/vs/server/node/serverServices.ts index a1f9cd11..9fc0cab6 100644 --- a/src/vs/server/node/serverServices.ts +++ b/src/vs/server/node/serverServices.ts @@ -71,6 +71,8 @@ import { ExtensionHostStatusService, IExtensionHostStatusService } from 'vs/serv import { IExtensionsScannerService } from 'vs/platform/extensionManagement/common/extensionsScannerService'; import { ExtensionsScannerService } from 'vs/server/node/extensionsScannerService'; import { NullPolicyService } from 'vs/platform/policy/common/policy'; +import { IExtensionsGalleryConfigService } from 'vs/platform/extensionsGallery/common/extensionsGalleryConfigService'; +import { ExtensionsGalleryConfigService } from 'vs/platform/extensionsGallery/common/extensionsGalleryConfig'; const eventPrefix = 'monacoworkbench'; @@ -150,6 +152,7 @@ export async function setupServerServices(connectionToken: ServerConnectionToken services.set(IServerTelemetryService, ServerNullTelemetryService); } + services.set(IExtensionsGalleryConfigService, new SyncDescriptor(ExtensionsGalleryConfigService)); services.set(IExtensionGalleryService, new SyncDescriptor(ExtensionGalleryServiceWithNoStorageService)); const downloadChannel = socketServer.getChannel('download', router); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 7f38b6df..57a81f9d 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -70,6 +70,7 @@ import { renderIcon } from 'vs/base/browser/ui/iconLabel/iconLabels'; import { Codicon } from 'vs/base/common/codicons'; import { assertType } from 'vs/base/common/types'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +import { IExtensionsGalleryConfigService } from 'vs/platform/extensionsGallery/common/extensionsGalleryConfigService'; export class PromptExtensionInstallFailureAction extends Action { @@ -87,6 +88,7 @@ export class PromptExtensionInstallFailureAction extends Action { @ILogService private readonly logService: ILogService, @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, @IInstantiationService private readonly instantiationService: IInstantiationService, + @IExtensionsGalleryConfigService readonly extensionsGalleryConfigService: IExtensionsGalleryConfigService, ) { super('extension.promptExtensionInstallFailure'); } @@ -131,11 +133,17 @@ export class PromptExtensionInstallFailureAction extends Action { }); } - else if (this.extension.gallery && this.productService.extensionsGallery && (this.extensionManagementServerService.localExtensionManagementServer || this.extensionManagementServerService.remoteExtensionManagementServer) && !isIOS) { + else if (this.extension.gallery && (this.productService.extensionsGallery || (this.extensionsGalleryConfigService && this.extensionsGalleryConfigService.serviceUrl)) && (this.extensionManagementServerService.localExtensionManagementServer || this.extensionManagementServerService.remoteExtensionManagementServer) && !isIOS) { + let extServiceURL: string = ''; + if (this.extensionsGalleryConfigService && this.extensionsGalleryConfigService.serviceUrl) { + extServiceURL = this.extensionsGalleryConfigService.serviceUrl; + } else if (this.productService.extensionsGallery) { + extServiceURL = this.productService.extensionsGallery!.serviceUrl; + } additionalMessage = localize('check logs', "Please check the [log]({0}) for more details.", `command:${Constants.showWindowLogActionId}`); promptChoices.push({ label: localize('download', "Try Downloading Manually..."), - run: () => this.openerService.open(URI.parse(`${this.productService.extensionsGallery!.serviceUrl}/publishers/${this.extension.publisher}/vsextensions/${this.extension.name}/${this.version}/vspackage`)).then(() => { + run: () => this.openerService.open(URI.parse(`${extServiceURL}/publishers/${this.extension.publisher}/vsextensions/${this.extension.name}/${this.version}/vspackage`)).then(() => { this.notificationService.prompt( Severity.Info, localize('install vsix', 'Once downloaded, please manually install the downloaded VSIX of \'{0}\'.', this.extension.identifier.id), diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index fb394a88..aa361899 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -47,6 +47,7 @@ import { IExtensionService, IExtensionsStatus } from 'vs/workbench/services/exte import { ExtensionEditor } from 'vs/workbench/contrib/extensions/browser/extensionEditor'; import { isWeb } from 'vs/base/common/platform'; import { GDPRClassification } from 'vs/platform/telemetry/common/gdprTypings'; +import { IExtensionsGalleryConfigService } from 'vs/platform/extensionsGallery/common/extensionsGalleryConfigService'; interface IExtensionStateProvider { (extension: Extension): T; @@ -75,7 +76,8 @@ export class Extension implements IExtension { @ITelemetryService private readonly telemetryService: ITelemetryService, @ILogService private readonly logService: ILogService, @IFileService private readonly fileService: IFileService, - @IProductService private readonly productService: IProductService + @IProductService private readonly productService: IProductService, + @IExtensionsGalleryConfigService readonly extensionsGalleryConfigService: IExtensionsGalleryConfigService, ) { } get type(): ExtensionType { @@ -154,6 +156,14 @@ export class Extension implements IExtension { } get url(): string | undefined { + if (this.extensionsGalleryConfigService.serviceUrl) { + if (this.extensionsGalleryConfigService.itemUrl && this.gallery) { + return `${this.extensionsGalleryConfigService.itemUrl}?itemName=${this.publisher}.${this.name}`; + } else { + this.logService.info('itemUrl undefine'); + return undefined; + } + } if (!this.productService.extensionsGallery || !this.gallery) { return undefined; } diff --git a/src/vs/workbench/contrib/preferences/browser/settingsLayout.ts b/src/vs/workbench/contrib/preferences/browser/settingsLayout.ts index 9d2c8958..f6171c79 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsLayout.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsLayout.ts @@ -228,6 +228,11 @@ export const tocData: ITOCEntry = { id: 'application/settingsSync', label: localize('settingsSync', "Settings Sync"), settings: ['settingsSync.*'] + }, + { + id: 'application/extensionsGallery', + label: localize('extensionsGallery', "Extensions Gallery"), + settings: ['extensionsGallery.*'] } ] }, diff --git a/src/vs/workbench/contrib/update/browser/update.contribution.ts b/src/vs/workbench/contrib/update/browser/update.contribution.ts index 5d22660c..581eafe9 100644 --- a/src/vs/workbench/contrib/update/browser/update.contribution.ts +++ b/src/vs/workbench/contrib/update/browser/update.contribution.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import 'vs/platform/update/common/update.config.contribution'; +import 'vs/platform/extensionsGallery/common/extensionsGallery.config.contribution'; import { localize } from 'vs/nls'; import { Registry } from 'vs/platform/registry/common/platform'; import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; diff --git a/src/vs/workbench/workbench.common.main.ts b/src/vs/workbench/workbench.common.main.ts index 497812e2..7f6c9a11 100644 --- a/src/vs/workbench/workbench.common.main.ts +++ b/src/vs/workbench/workbench.common.main.ts @@ -102,6 +102,8 @@ import 'vs/workbench/services/languageDetection/browser/languageDetectionWorkerS import 'vs/editor/common/services/languageFeaturesService'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; +import { ExtensionsGalleryConfigService } from 'vs/platform/extensionsGallery/common/extensionsGalleryConfig'; +import { IExtensionsGalleryConfigService } from 'vs/platform/extensionsGallery/common/extensionsGalleryConfigService'; import { ExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionGalleryService'; import { GlobalExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionEnablementService'; import { IExtensionGalleryService, IGlobalExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; @@ -133,6 +135,7 @@ registerSingleton(IUserDataSyncLogService, UserDataSyncLogService); registerSingleton(IIgnoredExtensionsManagementService, IgnoredExtensionsManagementService); registerSingleton(IGlobalExtensionEnablementService, GlobalExtensionEnablementService); registerSingleton(IExtensionStorageService, ExtensionStorageService); +registerSingleton(IExtensionsGalleryConfigService, ExtensionsGalleryConfigService); registerSingleton(IExtensionGalleryService, ExtensionGalleryService, true); registerSingleton(IContextViewService, ContextViewService, true); registerSingleton(IListService, ListService, true);