mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make file writable in python rename quick fixes
This commit is contained in:
@@ -99,6 +99,11 @@ public class PyRenameElementQuickFix implements LocalQuickFix {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldMakeCurrentFileWritable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void renameInUnitTestMode(@NotNull Project project, @NotNull PsiNameIdentifierOwner nameOwner,
|
||||
@Nullable Editor editor) {
|
||||
final PsiElement substitution = RenamePsiElementProcessor.forElement(nameOwner).substituteElementToRename(nameOwner, editor);
|
||||
|
||||
@@ -38,7 +38,7 @@ public class RenameParameterQuickFix implements LocalQuickFix {
|
||||
|
||||
public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) {
|
||||
final PsiElement elt = descriptor.getPsiElement();
|
||||
if (elt != null && elt instanceof PyNamedParameter && elt.isWritable()) {
|
||||
if (elt != null && elt instanceof PyNamedParameter) {
|
||||
new RenameProcessor(project, elt, myNewName, false, true).run();
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,11 @@ 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