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

Check whether editor commands are declared in package.json #11764

Conversation

colin-grant-work
Copy link
Contributor

@colin-grant-work colin-grant-work commented Oct 13, 2022

What it does

Fixes #11763 by checking whether commands registered via registerTextEditorCommand are declared in package.json and registering only a handler, if so.

How to test

  1. Install and activate CLangD.
  2. Observe that no warnings about redundant registration of clangd.typeHierarchy or clangd.ast are logged.
  3. Observe that the clangd.ast command still works as expected: right clicking in a C(++) editor should show a Show Ast menu item, and clicking it should add a view container part to the Navigator that shows the AST at that place in the file.

Review checklist

Reminder for reviewers

@colin-grant-work colin-grant-work added the vscode issues related to VSCode compatibility label Oct 13, 2022
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

The changes look good to me and I can confirm that the warnings no longer appear 👍

@colin-grant-work colin-grant-work merged commit 7f51450 into eclipse-theia:master Oct 17, 2022
@colin-grant-work colin-grant-work deleted the bugfix/text-editor-command-warning branch October 17, 2022 21:54
@vince-fugnitto vince-fugnitto added this to the 1.31.0 milestone Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vscode.commands.registerTextEditorCommand logs warning for any command listed in package.json
3 participants