GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mapstruct/mapstruct-idea: An IntelliJ IDEA plugin for working with MapStruct

BranchesTags
Open more actions menu

Latest commit

 

History

264 Commits
264 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
etc
etc
 
 
gradle
gradle
 
 
src
src
 
 
testData
testData
 
 
.codecov.yml
.codecov.yml
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE.txt
LICENSE.txt
 
 
NEXT_RELEASE_CHANGELOG.md
NEXT_RELEASE_CHANGELOG.md
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
change-notes.html
change-notes.html
 
 
copyright.txt
copyright.txt
 
 
description.html
description.html
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

mapstruct-idea

An IntelliJ IDEA plugin for working with MapStruct

License

Build Status Coverage Status

  • What is MapStruct?
  • Features
  • Requirements
  • Building from Source
  • Licensing

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. 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 annotation 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

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 https://www.apache.org/licenses/LICENSE-2.0.

About

An IntelliJ IDEA plugin for working with MapStruct

Topics

intellijjavamappingmapstructmapstruct-plugin

Resources

Readme
License
Activity
Custom properties

Stars

169 stars

Watchers

10 watching

Forks

41 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.