Cancel InplaceRename confuses reference resolving

Hi all,

in the Mathematica plugin I provide inplace-renaming of variables and this is working well. One problem arises when I start renaming a local variable by pressing Shift+F6 and then cancel it with Esc. Then the information that this variable has references is lost and all occurrences of the variable are not highlighted any more. Somehow canceling the process seems to invalidate the state of my PSI tree. Normally, I carefully track changes during editing by invalidating the subtree which was edited and rebuilding and chaching the reference information.

Question: When I press Esc during inplace renaming, is there a way to invalidate (com.intellij.extapi.psi.ASTDelegatePsiElement#subtreeChanged) the subtree I was about to change? Or is there any other solution?

Sidequestion: What is the difference between isInplaceRenameAvailable and isMemberInplaceRenameAvailable? I don't have members in my language, but it seems both methods are called during a rename.


1 comment
Comment actions Permalink

Push this to the top... Does really no one have an idea?


Please sign in to leave a comment.