Skip to content

mapstruct/mapstruct-idea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

45df29d · Apr 2, 2023
Nov 13, 2022
Feb 10, 2019
Nov 13, 2022
Apr 2, 2023
Apr 2, 2023
Aug 12, 2017
Aug 5, 2017
Apr 2, 2023
Aug 5, 2017
Apr 2, 2023
Nov 14, 2022
Apr 2, 2023
Aug 5, 2017
Dec 27, 2021
Apr 2, 2023
Nov 13, 2022
Nov 13, 2022
Aug 5, 2017

Repository files navigation

mapstruct-idea

An IntelliJ IDEA plugin for working with MapStruct

License

Build Status Coverage Status

What is MapStruct?

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

To learn more about MapStruct have a look at the mapstruct repository or the website

Features

  • Code completions
    • 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
  • Go To Declaration for Mapping#qualifiedByName
  • Find usages of properties in target and source and find usages of setters / getters in @Mapping annotations
  • Highlighting properties in target and source
  • Errors and Quick fixes:
    • @Mapper or @MapperConfig annotation missing
    • Unmapped target properties with quick fixes: Add unmapped target property and Ignore unmapped target property. NB: unmappedTargetPolicy is not yet considered

Requirements

The MapStruct plugin requires Java 11 or later

Building from Source

Since the project has been migrated to the Gradle and [Gradle IntelliJ plugin][gradle-intellij-plugin], the build process is much simpler. The only thing to build the plugin is to run:

./gradlew build

All required dependencies like Grammar-Kit, JFlex are downloaded in the background and triggered properly during the build process. You can also test the plugin easily with running:

./gradlew runIde

All of the gradle tasks can be connected to the IntelliJ debugger, so the development process is very easy.

Licensing

The MapStruct plugin is licensed under the Apache License, Version 2.0 (the "License"); you may not use it except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.