You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the best way to deal with this situation is to - of course - avoid the duplicated constructor - and to allow the user to easily switch to a different name for the injected bean. This could be done by popping up a dialog that asks the user for a different name or to activate a multi-part edit as part of the completion that pre-selects all the occurrences of the bean name (constructor param + field), so that the user can continue typing a different name and then continue.
The text was updated successfully, but these errors were encountered:
I think the multi-part edit can be triggered by marking the completion as a snippet completion and include placeholders inside. Although not sure how this works across multiple edits in the same proposal (like the main edit and the additional edits). To be investigated...
I'd silently generate a different name for the field... Might be too much work for the edge case... IntelliJ doesn't treat this any better than us currently...
Having a class like:
When you select a bean with the name
something
from the list of bean proposals, the result looks like this:From my observation, this causes:
I think the best way to deal with this situation is to - of course - avoid the duplicated constructor - and to allow the user to easily switch to a different name for the injected bean. This could be done by popping up a dialog that asks the user for a different name or to activate a multi-part edit as part of the completion that pre-selects all the occurrences of the bean name (constructor param + field), so that the user can continue typing a different name and then continue.
The text was updated successfully, but these errors were encountered: