Comments (5)
This is an issue with the lombok plugin specifically. I'll have to investigate how I can resolve this problem. Without lombok it works as expected.
Hi~ fillphr, thank u for your great tool, it is really helpful!
The above problem still seems to exist, for me, refactor code is a daliy job :)๏ผso this problem has bothered me for a long time. And do you have any plans to fix this problem?
looking forward to your reply๐
from mapstruct-idea.
This is an issue with the lombok plugin specifically. I'll have to investigate how I can resolve this problem. Without lombok it works as expected.
from mapstruct-idea.
When renaming the field in the bean it will use intellij (or lombok's) rename handler and just rename java fields and methods and break the mapping annotation.
When renaming the reference on the annotation (the string literal on source or target) idea asks which rename handler to use: lombok's oder mapstruct's. But the results are the same, renaming works for the fields and methods (getter, setter) and leaves the mapping parameter alone while breaking the mapping.
It is missing the rename of the literal where the reference to it should be found for the field that is about to be renamed. I think find references should return something to do the additional work on the annotation.
from mapstruct-idea.
@linzch3 It seems to me that this problem is now solved (maybe since IntelliJ integrated the lombok plugin into the IDE itself?)
Would you mind testing it again? It worked for me with my version:
IntelliJ IDEA 2023.3.2 (Ultimate Edition)
Build #IU-233.13135.103, built on December 20, 2023
Non-Bundled Plugins:
org.mapstruct.intellij (1.6.1)
from mapstruct-idea.
Thanks for testing this @thunderhook. Going to close it for now. If someone still has issues with this we can reopen it.
from mapstruct-idea.
Related Issues (20)
- 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
- Code completion: mapTo... suggestions take precedence over more useful suggestions HOT 6
- Code completion for annotation parameters like @Mapping is not working HOT 5
- False positive missing mapping warning HOT 11
- Incorrect no source property defined inspection for `@Mapping`
- Renaming a @Getter annotated field results in a getter inside the mapping definition (instead of the new field name) HOT 4
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.