mapstruct-idea icon indicating copy to clipboard operation
mapstruct-idea copied to clipboard

Support passing custom annotations to generated code

Open filiphr opened this issue 4 years ago • 0 comments

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#name and error when name does 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#enums and 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() and strings()
  • [ ] 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

filiphr avatar Jun 05 '22 12:06 filiphr