MapStruct Support

Поддержка MapStruct: помощь в проектах с генерацией маппинга бинов через аннотации

Filip HrisafovФреймворки17 736 загрузок

MapStruct support for IntelliJ IDEA

Website | GitHub | Issue Tracker |

This plugin gives some assistance in projects that use MapStruct to generate bean mapping code.

MapStruct is a Java annotation processor for the generation of type-safe and performant mappers for Java bean classes.

If you want to discuss specific topics, then ping me (@filiphr) in the MapStruct users chat room on gitter.
Features:

  • Code Completion:
    • Completion of target and source properties in @Mapping annotation (nested properties also work)
    • Completion of target and source properties in @ValueMapping annotation
    • Completion of componentModel in @Mapper and @MapperConfig annotations
    • Completion of qualifiedByName in @Mapping annotation
  • 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
  • Go To Declaration for Mapping#qualifiedByName
  • Highlighting properties in target and source
  • Refactoring support for properties and methods renaming
  • Errors and Quick Fixes:
    • @Mapper or @MapperConfig annotation missing
    • Unmapped target properties with quick fixes: Add unmapped target property and Ignore unmapped target property. Uses unmappedTargetPolicy to determine the severity that should be used
    • No source defined in @Mapping annotation
    • More than one source in @Mapping annotation defined with quick fixes: Remove source. Remove constant. Remove expression. Use constant as defaultValue. Use expression as defaultExpression.
    • More than one default source in @Mapping annotation defined with quick fixes: Remove defaultValue. Remove defaultExpression.
    • target mapped more than once by @Mapping annotations with quick fixes: Remove annotation and change target property.
    • used as a source in @Mapping annotations with quick fixes: Replace with method parameter name.
    • Unknown reference inspection for source and target in @Mapping and @ValueMapping annotation.
    • Unknown reference inspection for qualifiedByName in @Mapping annotation.

ВерсияOpenIDEДатаРазмер
2026.1+12.11.2026187,2 КБСкачать
2024.1+24.08.2025185,3 КБСкачать
2024.1+11.05.2025182,4 КБСкачать
2023.3+20.10.2024178 КБСкачать