mapstruct-idea
mapstruct-idea copied to clipboard
Support passing custom annotations to generated code
With the work in PR https://github.com/mapstruct/mapstruct/pull/2792 being done for https://github.com/mapstruct/mapstruct/issues/1574 it would be good to provide some support for the new API in the IntelliJ plugin as well.
Some things that we should do:
- [ ] Auto completion support for
AnnotateWith.Element#nameand error whennamedoes not exist in target enum. - [ ] Smart auto completion for
AnnotateWith.Element#classes(pick the class type based on the one in the annotation - [ ] Auto completion for
AnnotateWith.Element#enumsand error when enum value does not exist - [ ] Annotation cannot annotated the generated class / method (it doesn't have the right target element type)
- [ ] Error when more than one value type is provided, eg.
shorts()andstrings() - [ ] Error when duplicated
AnnotateWith.Element#name(more than one having the same name - [ ] Error when value does not match target annotation value type
- [ ] Error when using array value, but target value is not an array