mapstruct / mapstruct/mapstruct-idea
Support passing custom annotations to generated code
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 168
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading PR #2792 and issue #1574 to understand the new AnnotateWith API, then inspect the IntelliJ plugin's existing support for generated annotations. Done means implementing and validating the listed completion and error checks, including target compatibility, duplicate names, value types, and arrays.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100