mapstruct / mapstruct/mapstruct-idea

Auto completion for InheritConfiguration#name, InheritInverseConfiguration#name

Open
#163 1 comment 0 reactions 0 assignees View on GitHub
feature
Dominant language
Java
Stars
168
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Example code:
```java
@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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the plugin's handling of @InheritConfiguration and @InheritInverseConfiguration, using the example and linked documentation to understand how the name references a method in the same interface. Done means the name value offers completion for matching methods and supports navigation to the referenced method.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.