Rename Method Parameter

Hi

Is there some API to execute a renaming of a method parameter? Basically, executing an automated Shift-F6 on a method parameter (I've got the PsiVariable).

If there is no API for such a renaming, how would I have to tackle this?

Thanks for any help on this.

--Etienne

2 comments

Hello Etienne,

have a look at com.intellij.refactoring.RefactoringFactory &
RefactoringActionHandlerFactory. Those should provide what you're looking for,
either for programmatically renaming a certain element or to invoke the shift-f6
dialog.

HTH,
Sascha

0

Hi Sascha

This is exactly what I was looking for.
Thanks a lot.

--Etienne

0

Please sign in to leave a comment.