mapstruct / mapstruct/mapstruct-idea
Find usages and renaming for constructor fields
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 168
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
I've been trying to make this work. However, there are some problems with the custom ConstructorParametersReferencesSearcher that I've implemented. Find usages works properly. However, that causes some other problems:
- When I rename the constructor parameter in the constructor method then my element in the annotation is not renamed. This is tested by
MapstructMethodUsagesSearcherTest.testRenameConstructorTargetReferenceMethod - When I rename the element in the annotation and the class is in the same file as my annotation there is an error happening. This is tested in
RenameHandlerTest.testRenameConstructorTargetParameter. When I run the plugin in an IDE and the class is not in the same file as my annotation then the renaming is correct.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the custom ConstructorParametersReferencesSearcher and the two named tests: MapstructMethodUsagesSearcherTest.testRenameConstructorTargetReferenceMethod and RenameHandlerTest.testRenameConstructorTargetParameter. Reproduce both constructor-parameter rename scenarios and inspect their failures. Done means both tests pass, including renaming an annotation element when the class is in the same file without an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100