eclipse / lsp4jakarta

Language Server for Jakarta EE
Eclipse Public License 2.0
34 stars 51 forks source link

Explore whether the user experience can be improved for diagnostics / quick fixes involving @Dependent #537

Open mrglavas opened 4 days ago

mrglavas commented 4 days ago

The screenshots I'm including here are from Liberty tools for IntelliJ, but this also applies to LSP4Jakarta.

Consider a managed bean that has been annotated with multiple scopes: image

The user receives a diagnostic telling them that only one scope type annotation is allowed and is given the option of applying two quick fixes to either remove @Dependent or @RequestScoped.

Possibly not fully understanding the implications, they apply the quick fix to remove @Dependent and now are presented with two new diagnostics, including one which tells them that @Dependent is the only scope allowed: image

So that the user can make a better informed decision on how to fix their application code, it may be more helpful to present them with all of these diagnostics and perhaps they may resolve all of them with a quick fix in one step.

mrglavas commented 4 days ago

For reference, see the discussion on this Liberty Tools for IntelliJ PR here: https://github.com/OpenLiberty/liberty-tools-intellij/pull/1091#discussion_r1838585813 which led to this suggestion for improvement.