Skip to content

Support passing custom annotations to generated code #101

@filiphr

Description

@filiphr

With the work in PR mapstruct/mapstruct#2792 being done for mapstruct/mapstruct#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions