Skip to content

Commit 4bf364d

Browse files
authored
enable profiles (microsoft#158758)
- by default in insiders - behind the flag in stable
1 parent 337cd4b commit 4bf364d

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

src/vs/code/electron-main/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class CodeMain {
103103

104104
// Init services
105105
try {
106-
await this.initServices(environmentMainService, userDataProfilesMainService, configurationService, stateMainService);
106+
await this.initServices(environmentMainService, userDataProfilesMainService, configurationService, stateMainService, productService);
107107
} catch (error) {
108108

109109
// Show a dialog for errors that can be resolved by the user
@@ -235,7 +235,7 @@ class CodeMain {
235235
return instanceEnvironment;
236236
}
237237

238-
private async initServices(environmentMainService: IEnvironmentMainService, userDataProfilesMainService: UserDataProfilesMainService, configurationService: ConfigurationService, stateMainService: StateMainService): Promise<void> {
238+
private async initServices(environmentMainService: IEnvironmentMainService, userDataProfilesMainService: UserDataProfilesMainService, configurationService: ConfigurationService, stateMainService: StateMainService, productService: IProductService): Promise<void> {
239239
await Promises.settled<unknown>([
240240

241241
// Environment service (paths)
@@ -256,7 +256,7 @@ class CodeMain {
256256
configurationService.initialize()
257257
]);
258258

259-
userDataProfilesMainService.setEnablement(!!configurationService.getValue(PROFILES_ENABLEMENT_CONFIG));
259+
userDataProfilesMainService.setEnablement(productService.quality !== 'stable' || configurationService.getValue(PROFILES_ENABLEMENT_CONFIG));
260260
}
261261

262262
private async claimInstance(logService: ILogService, environmentMainService: IEnvironmentMainService, lifecycleMainService: ILifecycleMainService, instantiationService: IInstantiationService, productService: IProductService, retry: boolean): Promise<NodeIPCServer> {

src/vs/code/node/cliProcessMain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class CliMain extends Disposable {
164164
configurationService.initialize()
165165
]);
166166

167-
userDataProfilesService.setEnablement(!!configurationService.getValue(PROFILES_ENABLEMENT_CONFIG));
167+
userDataProfilesService.setEnablement(productService.quality !== 'stable' || configurationService.getValue(PROFILES_ENABLEMENT_CONFIG));
168168

169169
// URI Identity
170170
services.set(IUriIdentityService, new UriIdentityService(fileService));

src/vs/workbench/browser/web.main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ export class BrowserMain extends Disposable {
304304
})
305305
]);
306306

307-
userDataProfilesService.setEnablement(!!configurationService.getValue(PROFILES_ENABLEMENT_CONFIG));
307+
userDataProfilesService.setEnablement(productService.quality !== 'stable' || configurationService.getValue(PROFILES_ENABLEMENT_CONFIG));
308308
this._register(configurationService.onDidChangeConfiguration(e => {
309309
if (e.affectsConfiguration(PROFILES_ENABLEMENT_CONFIG)) {
310310
userDataProfilesService.setEnablement(!!configurationService.getValue(PROFILES_ENABLEMENT_CONFIG));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
118118
}
119119

120120
// Profiles
121-
if (typeof config.workbench?.experimental?.settingsProfiles?.enabled === 'boolean' && config.workbench.experimental.settingsProfiles.enabled !== this.settingsProfilesEnabled) {
121+
if (this.productService.quality === 'stable' && typeof config.workbench?.experimental?.settingsProfiles?.enabled === 'boolean' && config.workbench.experimental.settingsProfiles.enabled !== this.settingsProfilesEnabled) {
122122
this.settingsProfilesEnabled = config.workbench.experimental.settingsProfiles.enabled;
123123
changed = true;
124124
}

src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export class UserDataProfilesWorkbenchContribution extends Disposable implements
6666
}
6767

6868
private registerConfiguration(): void {
69-
if (this.productService.quality !== 'stable') {
69+
if (this.productService.quality === 'stable') {
7070
Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).registerConfiguration({
7171
...workbenchConfigurationNodeBase,
7272
'properties': {

src/vs/workbench/services/userDataProfile/common/userDataProfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ export const PROFILES_TTILE = { value: localize('settings profiles', "Settings P
7676
export const PROFILES_CATEGORY = PROFILES_TTILE.value;
7777
export const PROFILE_EXTENSION = 'code-profile';
7878
export const PROFILE_FILTER = [{ name: localize('profile', "Settings Profile"), extensions: [PROFILE_EXTENSION] }];
79-
export const PROFILES_ENABLEMENT_CONTEXT = ContextKeyExpr.and(ProductQualityContext.notEqualsTo('stable'), ContextKeyDefinedExpr.create(`config.${PROFILES_ENABLEMENT_CONFIG}`));
79+
export const PROFILES_ENABLEMENT_CONTEXT = ContextKeyExpr.or(ProductQualityContext.notEqualsTo('stable'), ContextKeyDefinedExpr.create(`config.${PROFILES_ENABLEMENT_CONFIG}`));
8080
export const CURRENT_PROFILE_CONTEXT = new RawContextKey<string>('currentSettingsProfile', '');
8181
export const HAS_PROFILES_CONTEXT = new RawContextKey<boolean>('hasSettingsProfiles', false);

0 commit comments

Comments
 (0)