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

correctly assign context to the tree view items #204856

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

amunger
Copy link
Contributor

@amunger amunger commented Feb 9, 2024

#203054

Piggy-backing off the context keys that were created for debug variable visualizations.

We will also likely need the extension that provided the variable in the context since the extension contributing a command will need to be able to coordinate with the other to get the full variable. (e.g. DataWrangler needing to run commands against the Jupyter extension's kernel)

@@ -197,7 +197,7 @@ registerDebugViewMenuItem(MenuId.DebugWatchContext, VIEW_MEMORY_ID, nls.localize
registerDebugViewMenuItem(MenuId.DebugWatchContext, REMOVE_EXPRESSION_COMMAND_ID, nls.localize('removeWatchExpression', "Remove Expression"), 20, CONTEXT_WATCH_ITEM_TYPE.isEqualTo('expression'), undefined, 'inline', icons.watchExpressionRemove);
registerDebugViewMenuItem(MenuId.DebugWatchContext, REMOVE_WATCH_EXPRESSIONS_COMMAND_ID, REMOVE_WATCH_EXPRESSIONS_LABEL, 20, undefined, undefined, 'z_commands');

registerDebugViewMenuItem(MenuId.NotebookVariablesContext, COPY_NOTEBOOK_VARIABLE_VALUE_ID, COPY_NOTEBOOK_VARIABLE_VALUE_LABEL, 20);
registerDebugViewMenuItem(MenuId.NotebookVariablesContext, COPY_NOTEBOOK_VARIABLE_VALUE_ID, COPY_NOTEBOOK_VARIABLE_VALUE_LABEL, 20, CONTEXT_VARIABLE_VALUE);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the when clause here is to check that the element has a value at all. It seems to work but I'm not sure if there's a clearer way to check notEmpty

@amunger amunger requested a review from connor4312 February 9, 2024 19:47
@amunger amunger marked this pull request as ready for review February 9, 2024 19:47
@vscodenpa vscodenpa added this to the February 2024 milestone Feb 9, 2024
@amunger amunger merged commit 3883134 into main Feb 9, 2024
6 checks passed
@amunger amunger deleted the aamunger/contextMenuContext branch February 9, 2024 20:58
@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants