microsoft / microsoft/vscode-java-pack

Renaming a symbol that has a Lombok @Getter or @Setter annotation also renames the annotations

Open
#1,203 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triaged bug code-action lombok
Dominant language
TypeScript
Stars
352
Forks
166
Avg merge
17h 47m
Merged PRs (30d)
32

Description

Environment:

  • VS Code Version: 1.78.2
  • Extension Version: 0.25.11
  • JDK Type & Version: 20
  • OS Type & Version: Windows 10

Step to Reproduce:

In a class, simply define a field and add @Getter and/or @Setter annotations to the field.

@Getter
private final String message = "Hello";

Put your cursor on the field and press f2 to start renaming the symbol. Rename it to for instance resultMessage.

Expected Behavior:

I would expect the code to end up like this:

@Getter
private final String resultMessage = "Hello";

Actual Behavior:

@getResultMessage
private final String resultMessage = "Hello";

Related Issues:

When placing the @Getter annotation at the Class level, the annotation is untouched.

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the issue in VS Code using the supplied Java snippet and extension versions, then compare renaming a field with field-level versus class-level @Getter or @Setter annotations. Done means F2 changes only the field name while leaving the annotation text unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.