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.

Changing a property and it’s getters / setters now leads to change of the source / target values accordingly.

With this plugin we are bringing first class support for MapStruct within IntelliJ and addressing long lasting requests from users for the support (such as mapstruct#520 and IDEABKL-7174).

Some of the new features:

Completion for Properties and Enum Constants

Code completion for source

Go To Declaration from annotation

Go To Declaration

Find Usages

Find usages from Source methods

I would also like to thank everyone in the Plugin Developers gitter chat and the people from Jetbrains for their help and guidance in developing this plugin :).

Download

You can find the plugin in the Jetbrains Plugins repository here.

Alternatively, you can get ZIP from GitHub.

Next steps

We would like to add support for Inspections and Quick Fixes for recommended usages of MapStruct.

Please try out the plugin and let us know what you think and what you would like to see in it. To get in touch, post a comment below or use one the following channels:

comments powered by Disqus