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

F2 rename of Lombok @Singular attribute does nothing #2828

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

snjeza
Copy link
Contributor

@snjeza snjeza commented Aug 31, 2023

@snjeza
Copy link
Contributor Author

snjeza commented Aug 31, 2023

test this please

1 similar comment
@snjeza
Copy link
Contributor Author

snjeza commented Sep 1, 2023

test this please

@snjeza snjeza changed the title F2 rename of Lombok @Singular attribute does nothing [WIP] F2 rename of Lombok @Singular attribute does nothing Sep 8, 2023
@rgrunber

This comment was marked as resolved.

@snjeza
Copy link
Contributor Author

snjeza commented Sep 8, 2023

retest this please.

@rgrunber This PR is not ready yet.

@snjeza snjeza changed the title [WIP] F2 rename of Lombok @Singular attribute does nothing F2 rename of Lombok @Singular attribute does nothing Sep 11, 2023
@snjeza
Copy link
Contributor Author

snjeza commented Sep 11, 2023

@rgrunber I have updated the PR. It is ready.

Copy link
Contributor

@rgrunber rgrunber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine. I remember a very similar issue so wanted to track it down. It's #1561 .

IJavaElement elementToSearch = JDTUtils.findElementAtSelection(typeRoot, param.getPosition().getLine(), param.getPosition().getCharacter(), this.preferenceManager, monitor);
if (elementToSearch == null) {
int offset = JsonRpcHelpers.toOffset(typeRoot.getBuffer(), param.getPosition().getLine(), param.getPosition().getCharacter());
elementToSearch = typeRoot.getElementAt(offset);
}

Is the code inside the if statement still necessary if we're moving the logic into JDTUtils#findElementAtSelection(..) ?

@snjeza
Copy link
Contributor Author

snjeza commented Sep 20, 2023

Is the code inside the if statement still necessary if we're moving the logic into JDTUtils#findElementAtSelection(..) ?

Yes, it is. See 8ba5bee#diff-38af31aa96ae8ee1debae74bf388b43dea8891646b1032ecdb2f4a7ea3e06f8cR1011

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
@snjeza
Copy link
Contributor Author

snjeza commented Sep 20, 2023

test this please

@rgrunber rgrunber merged commit 91ebb5f into eclipse-jdtls:master Sep 20, 2023
6 checks passed
@rgrunber rgrunber added this to the End September 2023 milestone Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

F2 rename of Lombok @Singular attribute does nothing
2 participants