Skip to content

quickfix not available where cursor lands by default on annotations #1812

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

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

snjeza
Copy link
Contributor

@snjeza snjeza commented Jul 4, 2021

Fixes redhat-developer/vscode-java#1992

Signed-off-by: Snjezana Peco [email protected]

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.

I noticed that if you save the editor (regardless of state), then the error range reverts back to excluding the the `@' and any possible whitespace between it and the annotation name.

@snjeza
Copy link
Contributor Author

snjeza commented Jul 6, 2021

@rgrunber I have updated the PR.

@rgrunber
Copy link
Contributor

rgrunber commented Jul 6, 2021

The issue seems fixed for regular spaces between @ and the type name, but not for new lines (followed by a save).

eg.

@


Test

I think the problem is in WorkspaceDiagnosticsHandler#convertRange(..). The marker attribute's line number (based off the position of the type) is used for the starting range, but if the @ occurs on an earlier line, everything before the type name would be ignored.

@snjeza
Copy link
Contributor Author

snjeza commented Jul 7, 2021

@rgrunber I have updated the PR.

@snjeza snjeza removed the in progress label Jul 7, 2021
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.

The change works for me, so I would be fine with submitting. Just a few small things to address.

@snjeza
Copy link
Contributor Author

snjeza commented Jul 7, 2021

@rgrunber I have updated the PR.

@snjeza snjeza merged commit 2efcdfb into eclipse-jdtls:master Jul 7, 2021
@snjeza snjeza deleted the issue-1992 branch July 7, 2021 21:48
@rgrunber rgrunber added this to the End July 2021 milestone Aug 11, 2021
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.

quickfix not available where cursor lands by default on annotations
2 participants