Closed hduelme closed 3 months ago
Good one @hduelme.
This looks good to me. Should we perhaps offer some quick fixes for it? Perhaps:
@Mapping
target
I can't think of another quick fox for this.
Nice @hduelme!
If a own annotation containing @Mapping or @Mappings is used the error is reported on the annotation directly
For this scenario there might be a "remove @MyMappingAnnotation
" as a quick fix. But I think this is more of an edge-case and not worth implementing.
I think the quick fix can be done in a separate issue.
@filiphr , @thunderhook I added your suggested quick fixes. The replace (or change) target quick fix currently only selects the text to change. If you know a better way to handle this, let me know.
Another idea for a quick fix is, to allow reusing properties automatically. For example, if the other annotation doesn't have a default source, we could offer a way to use our source as a default source.
@filiphr I resolved the merge conflicts.
Thanks @hduelme
I added an inspection if a target property is explicitly (using
@Mapping
) mapped more than once. The error is directly reported on the target field:Same applies if used inside
@Mappings
If a own annotation containing
@Mapping
or@Mappings
is used the error is reported on the annotation directly