-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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 menu contribution for python manage config #216018
Conversation
src/vs/workbench/services/actions/common/menusExtensionPoint.ts
Outdated
Show resolved
Hide resolved
profileActions.shift(); | ||
const menuActions: IAction[] = []; | ||
|
||
const key = this.contextKeyService.createOverlay([]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One key we probably should have in the overlap is the current group (run/debug/coverage) for extensions who want different behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, sorry could you clarify a bit what you mean here? There should be a context key for the current group and have it only show for some or make that configurable for the extension author?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The menu logic can run for all of them, but an author might want to only have a menu visible in one group, or have different menu entries for each group. So letting them do something like profileKind == "run"
would be good.
src/vs/workbench/contrib/testing/browser/testingExplorerView.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, one comment
if (group === TestRunProfileBitset.Run) { | ||
contextKeys.push(['testing.profile.context.group', 'run']); | ||
} | ||
if (group === TestRunProfileBitset.Debug) { | ||
contextKeys.push(['testing.profile.context.group', 'debug']); | ||
} | ||
if (group === TestRunProfileBitset.Coverage) { | ||
contextKeys.push(['testing.profile.context.group', 'coverage']); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you register the key in testingContextKeys.ts? That way it'll be automatically picked up for our docs :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes!
Menu contribution to allow extensions to contribute a configuration submenu for testing
related to this issue: microsoft/vscode-python#21845