Currently, I’m implementing getUseScope()
of my own PSI to use indexes to calculate the most narrow use scope using included files and including files.
I couldn’t find any documentation about this in the intellij-community code
com.intellij.refactoring.rename.RenameDialog#createSearchScopePanel
calls PsiSearchHelper.getInstance(myProject).getUseScope(myPsiElement)
on the EDT.
Index access on EDT is not recommended.
Which code is wrong now?
Is RenameDialog
wrong to call getUseScope()
on the EDT?
Or must getUseScope()
never use indexes?
Thanks!
Update: The SDK wraps things in a allowSlowOperations
in com.intellij.refactoring.rename.RenameHandler2Renamer#performRename
, but I logged my own slow operations error in getUseScope()
because accessing if slow operations are allowed is all @Internal
code.