MapStruct support for IntelliJ IDEA

I am very happy to announce the first version of the MapStruct IntelliJ IDEA plugin. Now we have official support for 2 IDEs, Eclipse being the first IDE for which we had support from earlier (plugin here).

With the power of IntelliJ you now get completions in @Mapping and @ValueMapping annotations (also for nested mappings ;)). Apart from that you also get support for: finding usages of methods directly within annotations, going to declarations from annotations, highlighting support within annotations and refactoring support.

Read more...

MapStruct 1.2.0.CR2 released

I’m very happy to announce the second candidate release of MapStruct 1.2!

The CR2 release mostly provides bug fixes and other smaller improvements since the CR1, e.g. related to the handling of mappingInheritanceStrategy (issue #1255). Further fixes concern the handling nested target properties (#1269).

Read more...

MapStruct 1.2.0.CR1 released

I’m very happy to announce the first candidate release of MapStruct 1.2!

The CR1 release mostly provides bug fixes and other smaller improvements since the Beta 3, e.g. related to the handling of the @ObjectFactory annotation (issues #1131 and #1242). Further fixes concern the handling of imports in the generated code (#1227, #543) and the error reporting in case of incorrect mapper definitions (#1150, #1185).

Read more...

MapStruct 1.2.0.Beta3 is out

The summer is nearly there, and so is MapStruct 1.2. Today it’s my pleasure to announce another release on our way to the Final: MapStruct 1.2 Beta 3!

This release continues to improve and stabilize the new feature of automatically creating sub-mapping methods. By default, no sub-mapping methods are generated for any types of the JDK (as those are typically no bean types which one would like to step into in the course of mapping). If more fine-grained control is needed, there is an SPI now which lets you define for which types sub-mapping methods should be created. Eventually, you also can turn off automatic sub-mappings completely if you prefer to have full control by explicitly defining all required bean mapping methods.

Besides that, several bugs were fixed:

  • The generated mappers were missing import statements in some cases (#1215, #1164)
  • Field mappings didn’t work for nested target properties (#1155)
  • Accessing a non-existent nested target property wasn’t handled gracefully (#1153)

Read more...

MapStruct 1.2.0.Beta2 released

Just shy of a month after the first Beta release of MapStruct 1.2, the team is happy to announce the second Beta, fixing a couple of bugs that sneaked in with the many new features offered by the new 1.2 release line.

We fixed 16 issues, most of them reported by users. The most infamous bugs reported and fixed are:

Plus, the newly introduced automapping feature now also creates Enum mapping methods.

Read more...