mapstruct-idea
mapstruct-idea copied to clipboard
An IntelliJ IDEA plugin for working with MapStruct
Adapt similar strategy as in the mapstruct processor for Immutables and FreeBuilder. Fixes issue #124.
From the immutables generated classes have the builder method 'from(...)' which creates a new copy of an instance as builder instance. The mapstruct processor correctly handles those methods in the...
```Java public class User { String name; } @Mapper public interface UserMapper { @Mapping(source="name", target="nom") UserDto toDto(User user) } ``` When you rename User.name to lastName, the mapping becomes `@Mapping(source="getLastName",...
I fixed #194. Now `conditionQualifiedByName` is accepted as a valid source property. `ignoreByDefault` was already handled before.
I think I found the root cause of #194. As show in the example of #196 the plugin currently doesn't check if there exists a source property with the same...
In #153 we added some more extensive support for inspections on mappings. Seems like we were a bit too eager in those inspections. An inspection like `@Mapping(target = "starred", conditionQualifiedByName...
I added an inspection if a target property is explicitly (using `@Mapping`) mapped more than once. The error is directly reported on the target field:  Same applies if used...
Resolves #163 Provided two test cases with multiple completion candidates.
I was trying to implement this pattern from documentation: As for mapper itself, it is working fine and dandy. The plugin, however, seems to have problem with finding the annotated...