mapstruct/mapstruct-idea
An IntelliJ IDEA plugin for working with MapStruct
19 Releases
Latest: 10mo ago
1.9.1Latest
📦 Enhancements
- Improve messages for unknown reference (#223)
- Disable unknown properties on mapping composition annotations (#236)
🐛 Bug fixes
- Target properties with collection getter are not properly recognized (#217)
- Valid String `ValueMapping` is incorrectly marked as error (#218)
- Properties with Lombok SuperBuilder are not properly resolved (#220)
- References of `qualifiedByName` work for protected methods that are not accessible by MapStruct (#226)
- Mapping enum that implements an interface leads to "Unmapped target property" warning (#235)
- Setters in Java Records should not be recognized (#232)
- Inspection "Target property must not be mapped more than once" incorrectly flags multiple mappings to "." (#241)
📦 Minimum Supported IntelliJ
- 2024.1
1.9.0
✨ Features
- New `@Mapping` Inspections:
- Report Non-existing target properties as errors (#178)
🐛 Bug fixes
- Plugin incorrectly gives unmapped target warning for Immutables-classes (#124)
📦 Minimum Supported IntelliJ
- 2024.1
1.8.0
✨ Features
- New `@Mapping` Inspections:
- Target property mapped more than once (#200)
- Warning using `source = "."` (#203)
- Support Kotlin K2 mode (#207)
🐛 Bug fixes
- Incorrect no source property defined inspection for `@Mapping` (#194)
📦 Minimum Supported Intellij
- 2023.3
1.7.0
✨ Features
- New `@Mapping` Inspections (#153)
- No source defined
- More than one source defined. Quick fixes:
- Remove `source`
- Remove `constant`
- Remove `expression`
- Use `constant` as `defaultValue`
- Use `expression` as `defaultExpression`
- + 3 more
📦 Enhancements
- Align `@InheritConfiguration` with MapStruct core and support auto inheritance (#151)
- Support collection getters as viable target setter (#149)
- Support java expression in `conditionExpression` (#154)
- Align expression support with MapStruct core (#164, #170)
- Disable unmapped target property warnings when implicitly mapping from a map (#167)
- Support java text blocks for expressions (#188)
🐛 Bug fixes
- Code completion doesn't work with Lombok `@SuperBuilder` annotation #159
📦 Minimum Supported Intellij
- 2022.2
1.6.1
📦 Enhancements
- Add smart completion for target in `@Mapping` (#4) - already mapped target are not proposed
🐛 Bug fixes
- Fix auto-completion for nested public fields (#145)
- Fix `IndexOutOfBoundsException` for target methods without parameter (#110)
📦 Minimum Supported Intellij
- 2021.2
1.6.0
✨ Features
- Support `@InheritConfiguration` for unmapped target properties inspection (#65)
📦 Enhancements
- Use `unmappedTargetPolicy` for severity for unmapped target properties inspection
🐛 Bug fixes
- Missing completion and go to declaration for `Mapping#qualifiedByName` in `MapperConfig (#136)
- Incorrect unmapped target property when using Mapping Composition within Mapping Composition (#125)
- Autocompletion for nested records (#117)
- Incorrect unmapped target property when `Mapping#target` contains a dot (#123)
- Incorrect unmapped target property with fluent setters (#121)
📦 Minimum Supported Intellij
- 2021.2
1.5.0
✨ Features
- Support for completion and Go To Definition within for `Mapping#qualifiedByName` (#107)
📦 Enhancements
- Adding unmapped target property quick fix should move cursor to source (#28)
📦 Minimum Supported Intellij
- 2021.2
1.4.0
📦 Enhancements
- Support for Java records (#99)
- Suppress redundant default parameter value assignment warning (#93)
- Suggest only missing constants for `ValueMapping#source` (#5)
- Find disabled builder in `@MapperConfig` (#97)
🐛 Bugs
- No language injection for expressions when target is a field (#95)
📦 Build
- Improve build/test infrastructure to support IDEA 2022.2/2022.3 and Java 17 (#113)
📦 Minimum Supported Intellij
- 2021.2
1.3.1
📦 Enhancements
- Improve Java expression injector both for better code completion and for more useable inspections (#89)
🐛 Bugs
- Plugin fatal crash in case using static constant in target field of `@Mapping` annotation (#88)
📦 Minimum Supported Intellij
- 2020.1
1.3.0
✨ Features
- Code completion for `BeanMapping#ignoreUnmappedSourceProperties` (#77)
- Quick Fix: support for configuring the order of source and target in `@Mapping` for "Add unmapped property" fix (#51)
- Support for Mapstruct explicit Builder disable (#67)
🐛 Bugs
- Code completion for generic builder not working (#78)
- Code completion uses builder constructor parameters (#78)
📦 Minimum Supported Intellij
- 2020.1
1.2.4
📝 Documentation
- Add plugin icon
🐛 Bugs
- Type information missing in auto completion for multi source methods and value mappings (#71)
- Use UAST instead of Kotlin plugin specific APIs (#69)
1.2.3
✨ Features
- Kotlin support for `target` / `source` in `@Mapping` and `@ValueMapping` (#20)
🐛 Bugs
- False positive unmapped target property for multi source methods (#60)
1.2.2
📦 Enhancements
- Support for mapping nested bean properties to current target (#58)
- Support `@BeanMapping#ignoreByDefault` for the unmapped target properties inspection (#54)
🐛 Bug fixes
- ClassCastException in language injection in expressions (#52)
1.2.1
✨ Features
- Support code completion in `Mapping#expression` and `Mapping#defaultExpression` (#30)
- Support meta annotations for when looking for unmapped target properties (#49)
🐛 Bug fixes
- public static fields / methods should not be considered as unmapped properties or resolved in auto completion (#47)
1.2.0
✨ Features
- Support for public fields (auto completion and unmapped target / source inspection warnings) (#16)
- Completion support for constructors (#45) - find usages and renaming of constructor fields doesn't work yet
- Quick Fix: Add ignore all unmapped target properties (#43)
🐛 Bug fixes
- Correctly resolve fluent Boolean accessor (#33)
- Only treat public non-static getters and setters as accessors (#38 and #48)
1.1.1
🐛 Bug fixes
- Compiler warning in decorator (#27)
- Compiler warning with a default method (#31)
1.1.0
✨ Features
- Completion Support for both fluent and conventional setters (#23)
- Support for types with Builder
- Quick fix for add unmapped target property (#9) - NB: `unmappedTargetPolicy` is not yet considerted
- Fix: Add unmapped property
- Fix: Ignore unmapped property
- Add warn info when `Mapper.getMapper(Class)` is used for non default mappers (#7)
- Add error info when class is not annotated with `@Mapper` or `@MapperConfig` (#6)
🐛 Bug fixes
- Overridden method is suggested twice (#24)
1.0.1
📋 Changes
- Properly handle methods with less than 3 characters (#10)
1.0.0
✨ Features
- Code completion for `target` and `source` in `@Mapping` and `@ValueMapping`
- Code completion for `componentModel` in `@Mapper` and `@MapperConfig`
- Go To Declaration for properties in `target` and `source` to setters / getters
- Find usages of properties in `target` and `source` and find usages of setters / getters in `@Mapping` annotations
- Highlighting properties in `target` and `source`
- Refactoring support for properties and methods renaming
