From a6b2cf5d28cfee9521c10bd4e05a47998deb2736 Mon Sep 17 00:00:00 2001 From: Joyce Er Date: Thu, 23 Jun 2022 09:49:49 -0700 Subject: [PATCH] Debt - register setting from contribution file (#152996) --- src/vs/workbench/browser/workbench.contribution.ts | 6 ------ .../browser/sessionSync.contribution.ts | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/browser/workbench.contribution.ts b/src/vs/workbench/browser/workbench.contribution.ts index 5e5b3b6e5e7..017f41f481a 100644 --- a/src/vs/workbench/browser/workbench.contribution.ts +++ b/src/vs/workbench/browser/workbench.contribution.ts @@ -486,12 +486,6 @@ const registry = Registry.as(ConfigurationExtensions.Con 'description': localize('layoutControlType', "Controls whether the layout control in the custom title bar is displayed as a single menu button or with multiple UI toggles."), 'markdownDeprecationMessage': localize({ key: 'layoutControlTypeDeprecation', comment: ['{0} is a placeholder for a setting identifier.'] }, "This setting has been deprecated in favor of {0}", '`#workbench.layoutControl.type#`') }, - 'workbench.experimental.editSessions.enabled': { - 'type': 'boolean', - 'tags': ['experimental'], - 'default': false, - 'markdownDescription': localize('editSessionsEnabled', "Controls whether to display cloud-enabled actions to store and resume uncommitted changes when switching between web, desktop, or devices."), - }, 'workbench.experimental.editor.dropIntoEditor.enabled': { 'type': 'boolean', 'default': true, diff --git a/src/vs/workbench/contrib/sessionSync/browser/sessionSync.contribution.ts b/src/vs/workbench/contrib/sessionSync/browser/sessionSync.contribution.ts index 2d0fe1fdcff..8bf79ae7c68 100644 --- a/src/vs/workbench/contrib/sessionSync/browser/sessionSync.contribution.ts +++ b/src/vs/workbench/contrib/sessionSync/browser/sessionSync.contribution.ts @@ -29,6 +29,8 @@ import { ILogService } from 'vs/platform/log/common/log'; import { IProductService } from 'vs/platform/product/common/productService'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuration'; +import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; registerSingleton(ISessionSyncWorkbenchService, SessionSyncWorkbenchService); @@ -318,3 +320,15 @@ export class SessionSyncContribution extends Disposable implements IWorkbenchCon const workbenchRegistry = Registry.as(WorkbenchExtensions.Workbench); workbenchRegistry.registerWorkbenchContribution(SessionSyncContribution, LifecyclePhase.Restored); + +Registry.as(Extensions.Configuration).registerConfiguration({ + ...workbenchConfigurationNodeBase, + 'properties': { + 'workbench.experimental.editSessions.enabled': { + 'type': 'boolean', + 'tags': ['experimental', 'usesOnlineServices'], + 'default': false, + 'markdownDescription': localize('editSessionsEnabled', "Controls whether to display cloud-enabled actions to store and resume uncommitted changes when switching between web, desktop, or devices."), + }, + } +});