Skip to content

Commit 578ffcf

Browse files
authored
Declare experimental Share setting in settings UI (microsoft#185917)
1 parent 6f748a1 commit 578ffcf

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/vs/workbench/contrib/share/browser/share.contribution.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle
3030
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
3131
import { IProgressService, ProgressLocation } from 'vs/platform/progress/common/progress';
3232
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
33+
import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry';
34+
import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuration';
3335

3436
const targetMenus = [
3537
MenuId.EditorContextShare,
@@ -128,3 +130,16 @@ class ShareWorkbenchContribution {
128130
registerSingleton(IShareService, ShareService, InstantiationType.Delayed);
129131
const workbenchContributionsRegistry = Registry.as<IWorkbenchContributionsRegistry>(Extensions.Workbench);
130132
workbenchContributionsRegistry.registerWorkbenchContribution(ShareWorkbenchContribution, LifecyclePhase.Eventually);
133+
134+
Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).registerConfiguration({
135+
...workbenchConfigurationNodeBase,
136+
properties: {
137+
'workbench.experimental.share.enabled': {
138+
type: 'boolean',
139+
default: false,
140+
tags: ['experimental'],
141+
markdownDescription: localize('experimental.share.enabled', "Controls whether to render the Share action next to the command center when {0} is {1}.", '`#window.commandCenter#`', '`true`'),
142+
restricted: false,
143+
}
144+
}
145+
});

0 commit comments

Comments
 (0)