Skip to content

Improving the Names Recommended by Extract Local Variable Refactoring. #745

@Michaelll123

Description

@Michaelll123

Describe the bug
When developers conduct Extract Local Variable refactorings, CDT will sometimes not recommend a name for the developers, or the recommended names by CDT are not appropriate.

To Reproduce
Steps to reproduce the behavior:

  1. Select an expression that needs to be extracted.
  2. Click on 'Extract Local Variable' to conduct the refactoring
  3. The popped dialog will be sometimes empty, i.e., without any recommended names.
  4. Or the recommended names are inappropriate and low-quality.

Expected behavior
The popped dialog should contain at least one recommended name. To make things better, the recommended name should be appropriate in the current context, and descriptive enough to deliver the semantic meaning of the extracted expression.

Screenshots
FailToRecommend
InappropriateName

Version Information (please complete the following information):

  • OS and OS Version/extra details: Windows
  • Eclipse Version from Help -> About: 2024-03, 4.31.0
  • CDT Version from Help -> About -> Installation Details -> Features tab: 11.5.0

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions