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

Extension always shows some C++ file specific commands in the command palette #10421

Closed
mjbvz opened this issue Jan 25, 2023 · 4 comments
Closed
Labels
enhancement Improvement to an existing feature fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix
Milestone

Comments

@mjbvz
Copy link

mjbvz commented Jan 25, 2023

Environment

  • C/C++ Extension Version: v1.14.0 pre-released

Bug Summary and Steps to Reproduce

  1. Install extension
  2. Open a non c++ file, such as a .py file
  3. Open command plate and search c++

bug
A bunch of commands that are specific to c/c++ files are shown in the command palette. A good example is Go to next preprocessor directive

Screenshot 2023-01-25 at 3 46 57 PM

These commands should be reviewed and any that only apply in c++ files should be hidden when not in relevant files

Configuration and Logs

NA

Other Extensions

No response

Additional context

These commands can be hidden by adding an enablement clause to the command contribution, or using the menus.commandPalette contribution

@Colengms
Copy link
Collaborator

It looks like the following are specific to the active file and should be hidden if the active file is not C/C++/CUDA:

SwitchHeaderSource
EnableErrorSquiggles
DisableErrorSquiggles
ToggleDimInactiveRegions
RestartIntelliSenseForFile
GoToNextDirectiveInGroup
GoToPrevDirectiveInGroup
CreateDeclarationOrDefinition
RunCodeAnalysisOnActiveFile
BuildAndDebugFile
BuildAndRunFile
AddDebugConfiguration
GenerateDoxygenComment

It looks like the following can be removed entirely:

ToggleIncludeFallback
TakeSurvey

@sean-mcmanus sean-mcmanus added this to the On Deck milestone Feb 7, 2023
@sean-mcmanus sean-mcmanus added help wanted Can be fixed in the public (open source) repo. enhancement Improvement to an existing feature labels Feb 7, 2023
@sean-mcmanus sean-mcmanus self-assigned this Jul 27, 2023
@sean-mcmanus sean-mcmanus modified the milestones: On Deck, 1.17 Jul 27, 2023
@sean-mcmanus sean-mcmanus modified the milestones: 1.17, 1.17.1 Jul 27, 2023
@sean-mcmanus sean-mcmanus removed the help wanted Can be fixed in the public (open source) repo. label Jul 27, 2023
@sean-mcmanus
Copy link
Collaborator

I ran across this issue while investigating the pending Extract Function commands and code actions changes in package.json.

@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Aug 1, 2023
@michelleangela
Copy link
Contributor

@michelleangela
Copy link
Contributor

@github-actions github-actions bot locked and limited conversation to collaborators Sep 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improvement to an existing feature fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix
Projects
None yet
Development

No branches or pull requests

4 participants