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

Completion of nested property of generic source property

Open daniel-shuy opened this issue 5 years ago • 0 comments

Example Source class (Lombok used for brevity):

import org.geolatte.geom.G2D;
import org.geolatte.geom.Point;

@Getter
@Setter
public class Location {
    private Point<G2D> coordinates;

    // ...
}

eg. when attempting to map the latitude of coordinates:

@Mapping(source = "coordinates.position.lat", target = "latitude")

Point#getPosition() returns the type argument, in this case G2D, but the plugin infers it as P (the type parameter), and hence fails to autocomplete the G2D#getLat() property.

daniel-shuy avatar Sep 10 '21 16:09 daniel-shuy