-
Notifications
You must be signed in to change notification settings - Fork 206
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
further refinements for quick fixes around mapping annotations #1109
Comments
The recipe that performs the refactoring won't only convert mappings into |
Hmmm... I think I understand. While the quick fix for the line with the warning is precise (we know it converts the Maybe we need to change the description then to make this more obvious to the user. The last part at the end
And have the individual one listed as the first item in the quick fix list. What do you think? |
All sound good with likely one exception - the order of quick fixes in eclipse might be out of our control or not easy to adjust. Maybe I'll reword the method scope fix label such that Eclipse sorting is acceptable ;-) |
@martinlippert I experimented with wording the labels for quick fixes such that they are sorted acceptably but gave up due to various inconsistencies... /**
* Marks this as a preferred action. Preferred actions are used by the
* `auto fix` command and can be targeted by keybindings.
*
* A quick fix should be marked preferred if it properly addresses the
* underlying error. A refactoring should be marked preferred if it is the
* most reasonable choice of actions to take.
*
* @since 3.15.0
*/
isPreferred?: boolean; Once the CodeAction (quickfix) has |
The core of LSP4E should not have a dependency on JDT, so implementing |
Oops... yes, indeed lsp4e shouldn't be dependent on JDT... Seems like we'd need some interface in eclipse platform with a method |
@martinlippert Handled sorting of quickfixes on our side (tooling.boot.ls plugin): d1e9ed5 Spring Boot type of error rather than generic Language Servers: Spring icon next to quickfix. Felt like a good "spot on" thing to emphasize that this is a Spring fix. (Of course we could either switch it off or find more appropriate icon) |
Follow-up refinements from #1107:
In case I have something like:
I get quick fixes presented:
@GetMapping
@PostMapping
etc. (looks all good to me).
In case I have something like:
I get three quick fixes that look a bit strange in combination to each other:
@RequestMapping
with specific@GetMapping
,@PostMapping
etc in file@RequestMapping
with specific@GetMapping
,@PostMapping
etc in project@PostMapping
This doesn't look consistent to me. I would expect that the quick fix for the first two elements in this list (for "in file" and "in project") would also take into account that this is about
@PostMapping
, and not random mappings. The quick fixes should look like:@PostMapping
@PostMapping
in file@PostMapping
in projectThe text was updated successfully, but these errors were encountered: