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:
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:
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.
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:
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: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.