microsoft / microsoft/vscode-cpptools

[Feature Request] Update include directives when header files are renamed

Open
#4,823 9 comments 19 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request Feature: Refactoring Language Service
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

I find it helpful if the plugin can check for header file renames in the project and provide an option to update all #include directives in source files to include the renamed file.

Such a feature is for example available in Visual Assist as described in https://www.wholetomato.com/features/feature-refactoring#rename-file. The other feature described in the link is renaming header/source files in pairs. It would be great to include that feature as well but it is OK not to have it since manually renaming is not that troublesome. However finding all the #include directives and replacing them is more troublesome and should be automated.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by locating the TypeScript extension code related to file renames and C/C++ #include references; done means offering an option that updates all affected include directives when a header is renamed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.