mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
write access for elements which probably differ from the current file
This commit is contained in:
@@ -24,6 +24,7 @@ import com.intellij.openapi.fileEditor.OpenFileDescriptor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.PsiNameIdentifierOwner;
|
||||
import com.intellij.psi.PsiReference;
|
||||
import com.intellij.psi.search.LocalSearchScope;
|
||||
@@ -99,9 +100,10 @@ public class PyRenameElementQuickFix implements LocalQuickFix {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public boolean shouldMakeCurrentFileWritable() {
|
||||
return true;
|
||||
public PsiElement getElementToMakeWritable(@NotNull PsiFile file) {
|
||||
return file;
|
||||
}
|
||||
|
||||
private static void renameInUnitTestMode(@NotNull Project project, @NotNull PsiNameIdentifierOwner nameOwner,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -53,11 +53,6 @@ public class RenameParameterQuickFix implements LocalQuickFix {
|
||||
return PyBundle.message("QFIX.rename.parameter.to.$0", myNewName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldMakeCurrentFileWritable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean startInWriteAction() {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user