Suppose I have these types:
public interface BaseEntityMapper<E extends AbstractEntity, D extends AbstractDto> {
E toEntity(D src);
D toDto(E src);
}
@Mapper
public interface CarEntityMapper extends BaseEntityMapper<Car, CarDto> {
// nothing
}
If Car and CarDto map nicely, then CarEntityMapperImpl will be generated as one would expect and it works great.
However, if they don't map nicely, e.g. due to unmapped target properties, the diagnostics are generated with the locations of the methods in BaseEntityMapper. If that type is located in an already created jar, the marker might not be visible in some IDEs or in javac.
I think that, generally, if we create a diagnostic for some mapper to generate, we should only use locations within that mapper. In this case, an "unmapped target property" could be located at "extends BaseEntityMapper".
WDYT?
Suppose I have these types:
If Car and CarDto map nicely, then
CarEntityMapperImplwill be generated as one would expect and it works great.However, if they don't map nicely, e.g. due to unmapped target properties, the diagnostics are generated with the locations of the methods in BaseEntityMapper. If that type is located in an already created jar, the marker might not be visible in some IDEs or in javac.
I think that, generally, if we create a diagnostic for some mapper to generate, we should only use locations within that mapper. In this case, an "unmapped target property" could be located at "extends BaseEntityMapper".
WDYT?