Comments (8)
Can you please be a bit more specific about what isn't working? The MapStruct version shouldn't affect the completion.
Can you please share an example of your mapper and source / target classes so we can look into it?
from mapstruct-idea.
Can you please be a bit more specific about what isn't working? The MapStruct version shouldn't affect the completion.
Can you please share an example of your mapper and source / target classes so we can look into it?
ok,the classes as below
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CompareA {
private String name;
private Integer age;
private LocalDateTime createTime;
private double score;
private Double totalScore;
private Date updateTIme;
private ChildCompare childCompare;
private Long days;
}
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CompareB {
private String name;
private Integer age;
private String createTime;
private double score;
private Double totalScore;
private Date updateTIme;
private ChildCompare childCompare;
private Long day;
}
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ChildCompare {
private String childName;
private long childAge;
}
@Mapper
public interface CompareConvert {
CompareConvert INSTANCE = Mappers.getMapper(CompareConvert.class);
@Mappings({
@Mapping(source = "days",target = "day"),
@Mapping(source = "createTime",target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss"),
@Mapping(source = "childCompare",target = "childCompare", mappingControl = DeepClone.class)
})
CompareB convert(CompareA compareA);
}
from mapstruct-idea.
I think the problem relates to your usage of Lombok. Currently Lombok is not completely supported in this plugin.
from mapstruct-idea.
I think the problem relates to your usage of Lombok. Currently Lombok is not completely supported in this plugin.
yes,I user lombok.the version of lombok is 1.18.22
from mapstruct-idea.
I think the problem relates to your usage of Lombok. Currently Lombok is not completely supported in this plugin.
I remove lombok,but MapStruct Support 1.3.1 Completion of target and source properties in @mapping can not work,i think the problem relates to idea version
from mapstruct-idea.
Is there any possible solution to this? I'm having the same issue. I tried on both IDEA 2022.1 and 2021.3 with Mapstruct 1.5.3.Final and Lombok 1.18.24. When I Ctrl+left click on the annotation it goes to the declaration properly, but the completion candidates never show up. I've also tried delombok the classes and it does not make difference.
from mapstruct-idea.
@dealexce @daitianci the MapStruct version that you are using doesn't make a difference. Are you sure that you have the IntelliJ MapStruct Plugin installed?
from mapstruct-idea.
Closing this, since I cannot reproduce it
from mapstruct-idea.
Related Issues (20)
- java.lang.ClassCastException: Object of type Address can't be cast to CompositeTracker HOT 1
- Support the '-Amapstruct.unmappedTargetPolicy' config of maven-compiler-plugin HOT 1
- Rework `@InheritConfiguration` and support auto-inheritance
- Fix build with ideaVersion `LATEST-EAP-SNAPSHOT` HOT 3
- Fix workaround for getting the mockJDK annotations.jar in the gradle build HOT 1
- Code completion doesn't work with lombok @SuperBuilder annotation HOT 3
- Unmapped target properties warning is missing if source is a Java record HOT 5
- Auto completion for InheritConfiguration#name, InheritInverseConfiguration#name HOT 1
- Disable unmapped target property warnings when implicitly mapping from a map HOT 2
- Completion for properties don't work (both target and source) HOT 2
- Array and Map paramter ignored as source-parameter if used as only source
- Java expression HOT 1
- Report Non-existing target properties as errors HOT 1
- WrongUsageOfMappersFactoryInspection ignores if componentModel is defined in MapperConfig HOT 1
- IDE Support of `BeanMapping#ignoredTargets`
- Code Completion didn't work well. HOT 12
- Wrong usage of mappers factory should be able to remove static initializer
- code wraps automatically, does not recognize keywords HOT 1
- Incompatible with idea 2024.1 RC HOT 4
- Plugin reports "Can't find related attribute" warning when using `source="."` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapstruct-idea.