mapstruct-idea icon indicating copy to clipboard operation
mapstruct-idea copied to clipboard

Auto completion for InheritConfiguration#name, InheritInverseConfiguration#name

Open alexbudarov opened this issue 2 years ago • 1 comments

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

alexbudarov avatar Dec 01 '23 14:12 alexbudarov

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 :)

filiphr avatar Dec 15 '23 21:12 filiphr