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

add create temp profile action to create picker #161810

Merged
merged 1 commit into from Sep 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -141,31 +141,38 @@ registerAction2(class CreateProfileAction extends Action2 {
}, {
id: CreateEmptyProfileAction.ID,
label: CreateEmptyProfileAction.TITLE.value,
}, {
id: CreateTransientProfileAction.ID,
label: CreateTransientProfileAction.TITLE.value,
}], { hideInput: true, canPickMany: false, title: localize('create settings profile', "{0}: Create...", PROFILES_CATEGORY) });
if (pick) {
return commandService.executeCommand(pick.id);
}
}
});

registerAction2(class CreateTransientProfileAction extends Action2 {
class CreateTransientProfileAction extends Action2 {
static readonly ID = 'workbench.profiles.actions.createTemporaryProfile';
static readonly TITLE = {
value: localize('create temporary profile', "Create a Temporary Settings Profile"),
original: 'Create a Temporary Settings Profile'
};
constructor() {
super({
id: 'workbench.profiles.actions.createTemporaryProfile',
title: {
value: localize('create temporary profile', "Create a Temporary Settings Profile"),
original: 'Create a Temporary Settings Profile'
},
id: CreateTransientProfileAction.ID,
title: CreateTransientProfileAction.TITLE,
category: PROFILES_CATEGORY,
f1: true,
precondition: PROFILES_ENABLEMENT_CONTEXT
precondition: PROFILES_ENABLEMENT_CONTEXT,
});
}

async run(accessor: ServicesAccessor) {
return accessor.get(IUserDataProfileManagementService).createAndEnterTransientProfile();
}
});
}

registerAction2(CreateTransientProfileAction);

export class RenameProfileAction extends Action2 {
static readonly ID = 'workbench.profiles.actions.renameProfile';
Expand Down