Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default IWorkbenchExtensionManagementService impl #468

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 2 additions & 31 deletions src/missing-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { IDownloadService } from 'vs/platform/download/common/download.service'
import { IEncryptionService } from 'vs/platform/encryption/common/encryptionService.service'
import { IEnvironmentService } from 'vs/platform/environment/common/environment.service'
import { ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'
import { IExtensionGalleryService, IExtensionManagementService, IExtensionTipsService, IGlobalExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement.service'
import { IExtensionGalleryService, IExtensionTipsService, IGlobalExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement.service'
import { IExtensionStorageService } from 'vs/platform/extensionManagement/common/extensionStorage.service'
import { IExtensionsProfileScannerService } from 'vs/platform/extensionManagement/common/extensionsProfileScannerService.service'
import { IExtensionsScannerService } from 'vs/platform/extensionManagement/common/extensionsScannerService.service'
Expand Down Expand Up @@ -1940,35 +1940,6 @@ registerSingleton(ITerminalQuickFixService, class TerminalQuickFixService implem
registerCommandSelector = unsupported
}, InstantiationType.Delayed)

registerSingleton(IExtensionManagementService, class ExtensionManagementService implements IExtensionManagementService {
toggleAppliationScope = async (extension: ILocalExtension) => extension
_serviceBrand: undefined
installGalleryExtensions = unsupported
onInstallExtension = Event.None
onDidInstallExtensions = Event.None
onUninstallExtension = Event.None
onDidUninstallExtension = Event.None
onDidUpdateExtensionMetadata = Event.None
zip = unsupported
unzip = unsupported
getManifest = unsupported
install = unsupported
canInstall = unsupported
installFromGallery = unsupported
installFromLocation = unsupported
installExtensionsFromProfile = unsupported
uninstall = unsupported
reinstallFromGallery = unsupported
getInstalled = async () => []
getExtensionsControlManifest = unsupported
copyExtensions = unsupported
updateMetadata = unsupported
download = unsupported
registerParticipant = unsupported
getTargetPlatform = unsupported
cleanUp = unsupported
}, InstantiationType.Delayed)

registerSingleton(IUserDataSyncWorkbenchService, class UserDataSyncWorkbenchService implements IUserDataSyncWorkbenchService {
_serviceBrand: undefined
enabled = false
Expand Down Expand Up @@ -2347,7 +2318,7 @@ registerSingleton(IWorkbenchExtensionManagementService, class WorkbenchExtension
installExtensionsFromProfile = unsupported
uninstall = unsupported
reinstallFromGallery = unsupported
getInstalled = unsupported
getInstalled = async () => []
getExtensionsControlManifest = unsupported
copyExtensions = unsupported
updateMetadata = unsupported
Expand Down
6 changes: 3 additions & 3 deletions src/service-override/extensionGallery.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { IEditorOverrideServices } from 'vs/editor/standalone/browser/standaloneServices'
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'
import { IExtensionGalleryService, IExtensionManagementService, IExtensionTipsService, IGlobalExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement.service'
import { IExtensionGalleryService, IExtensionTipsService, IGlobalExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement.service'
import { ExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionGalleryService'
import { GlobalExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionEnablementService'
import { IExtension as IContribExtension } from 'vs/workbench/contrib/extensions/common/extensions'
import { IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions.service'
import { getLocale } from 'vs/platform/languagePacks/common/languagePacks'
import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService'
import { IExtensionManagementServerService, IWebExtensionsScannerService, IWorkbenchExtensionEnablementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement.service'
import { IExtensionManagementServerService, IWebExtensionsScannerService, IWorkbenchExtensionEnablementService, IWorkbenchExtensionManagementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement.service'
import { ExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagementServerService'
import { IExtensionIgnoredRecommendationsService, IExtensionRecommendationsService } from 'vs/workbench/services/extensionRecommendations/common/extensionRecommendations.service'
import { ExtensionRecommendationsService } from 'vs/workbench/contrib/extensions/browser/extensionRecommendationsService'
Expand Down Expand Up @@ -117,7 +117,7 @@ export default function getServiceOverride (options: ExtensionGalleryOptions = {
[IExtensionIgnoredRecommendationsService.toString()]: new SyncDescriptor(ExtensionIgnoredRecommendationsService, [], true),
[IIgnoredExtensionsManagementService.toString()]: new SyncDescriptor(IgnoredExtensionsManagementService, [], true),
[IExtensionManifestPropertiesService.toString()]: new SyncDescriptor(ExtensionManifestPropertiesService, [], true),
[IExtensionManagementService.toString()]: new SyncDescriptor(ExtensionManagementService, [], true),
[IWorkbenchExtensionManagementService.toString()]: new SyncDescriptor(ExtensionManagementService, [], true),
[IBuiltinExtensionsScannerService.toString()]: new SyncDescriptor(CustomBuiltinExtensionsScannerService, [], true),
[IWorkspaceExtensionsConfigService.toString()]: new SyncDescriptor(WorkspaceExtensionsConfigService, [], true),
[IExtensionTipsService.toString()]: new SyncDescriptor(ExtensionTipsService, [], true),
Expand Down