Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto completion for InheritConfiguration#name, InheritInverseConfiguration#name #163

Open
alexbudarov opened this issue Dec 1, 2023 · 1 comment · May be fixed by #199
Open

Auto completion for InheritConfiguration#name, InheritInverseConfiguration#name #163

alexbudarov opened this issue Dec 1, 2023 · 1 comment · May be fixed by #199
Labels

Comments

@alexbudarov
Copy link

alexbudarov commented Dec 1, 2023

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 alexbudarov changed the title Feature request: auto completion for InheritConfiguration#name, InheritInverseConfiguration#name Auto completion for InheritConfiguration#name, InheritInverseConfiguration#name Dec 1, 2023
@filiphr
Copy link
Member

filiphr commented Dec 15, 2023

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

thunderhook added a commit to thunderhook/mapstruct-idea that referenced this issue Jun 1, 2024
thunderhook added a commit to thunderhook/mapstruct-idea that referenced this issue Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants