mapstruct-idea
mapstruct-idea copied to clipboard
Auto completion for InheritConfiguration#name, InheritInverseConfiguration#name
Example code:
@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE, componentModel = MappingConstants.ComponentModel.SPRING)
public interface VisitMapper {
@Mapping(source = "assignedVetId", target = "assignedVet.id")
@Mapping(source = "petId", target = "pet.id")
Visit toEntity(VisitDto visitDto);
@InheritInverseConfiguration(name = "toEntity")
VisitDto toDto(Visit visit);
}
The @InheritInverseConfiguration#name is referencing a method in the same interface - toEntity().
Would be great to have auto completion and navigation.
Documentation: https://mapstruct.org/documentation/stable/reference/html/#mapping-configuration-inheritance https://mapstruct.org/documentation/stable/reference/html/#inverse-mappings
This is a good idea @alexbudarov.
For how to implement this we can look at the implementation for org.junit.jupiter.params.provider.MethodSource in IntelliJ itself.
If there is someone from the community that would like to work on this please let us know :)