mapstruct-idea
mapstruct-idea copied to clipboard
Add smart completion for ValueMapping
Smart completion for @ValueMapping
annotation means that the suggested values are not used in the other @ValueMapping
annotations for this method.
This idea is now 5 years old, but still I would like to see that in mapstruct-idea
.
I agree that for @ValueMapping
the source should only suggested values are not used in the other @ValueMapping
. But for the targets this don't apply.
For example:
A -> B
B -> C
is a valid mapping, but also
A -> B
C -> B
is valid.
@hduelme keep in mind that normal auto completion works.
and yes you are right repeating targets do apply. So this smart completion will mostly be for the source.
Do you by any chance want to work on this functionality?
@filiphr I completely new to IntelliJ plugin development. But still I want to try.
I already found the related source ComponentModelCompletionContributor
.
There is a hit whats missing:
TODO If we can somehow get access to all the AnnotationBasedComponentModelProcessor and extract their getComponentModelIdentifier then we can use those. I don't know how to do this within the plugin
I think if we found a way to get them all we could also improve other parts for example duplicated source/target checks.