Skip to content

[Feature Request] Add "Manually Include Header" option to right-click context menu #251468

Closed as not planned
@Alonglosef

Description

@Alonglosef

Description

We propose adding a "Manually Include Header" option to the right-click context menu in the IDE, which would provide a more intuitive and accurate way to include header files from the same project.

Proposed Solution

  1. Add new right-click menu item:
    "Right-click on file → "Manually Include Header""
  2. Trigger a native file browser dialog showing:
    • Only valid header files (.h/.hpp/.hh extensions)
    • Filtered view of headers within the same project directory structure
  3. Auto-generate the correct include statement with either:
    • Relative path (for same-directory headers)
    • Project-relative path (for other cases)
// Example output in source file
 #include "subfolder/header.h" 

Benefits

  • Reduces inclusion errors
  • Eliminates manual path typing
  • Maintains project directory structure awareness
  • Faster than current manual methods

Additional Context

Suggested implementation locations:

  • Right-click context in:
    • Source file editors (.cpp/.c)
    • Header file explorers
  • Should respect project build system configurations

Acceptance Criteria

  • File browser shows only valid header files
  • Generated include statements follow project style guidelines
  • Works with both relative and absolute path modes
  • Supported in all file view contexts

Metadata

Metadata

Assignees

Labels

*extension-candidateIssue identified as good extension implementation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions