mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't allow cross-file inplace rename
This commit is contained in:
@@ -56,6 +56,7 @@ public class PyRefactoringProvider extends RefactoringSupportProvider {
|
||||
|
||||
@Override
|
||||
public boolean isInplaceRenameAvailable(PsiElement element, PsiElement context) {
|
||||
if (context != null && context.getContainingFile() != element.getContainingFile()) return false;
|
||||
PyFunction containingFunction = PsiTreeUtil.getParentOfType(element, PyFunction.class);
|
||||
if (containingFunction != null) {
|
||||
if (element instanceof PyTargetExpression || element instanceof PyFunction || element instanceof PyClass) {
|
||||
|
||||
Reference in New Issue
Block a user