Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find usages and renaming for constructor fields #46

Open
filiphr opened this issue Jun 1, 2020 · 2 comments
Open

Find usages and renaming for constructor fields #46

filiphr opened this issue Jun 1, 2020 · 2 comments

Comments

@filiphr
Copy link
Member

filiphr commented Jun 1, 2020

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.
@KENNYSOFT
Copy link
Contributor

Just a small idea: could it be related with referenceSearch? For now, this plugin only offers methodReferenceSearch and I think PsiParameter would not be tracked during the rename process.

@filiphr
Copy link
Member Author

filiphr commented Apr 23, 2023

You are right @KENNYSOFT. It might be related to that. Perhaps we should indeed provide a custom referenceSearch. That might solve all problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants