wrap only in-place introduce into a write action

This commit is contained in:
peter
2016-03-18 08:32:47 +01:00
parent 1ce9b4763f
commit 4304a317a6
2 changed files with 3 additions and 3 deletions
@@ -530,7 +530,7 @@ public abstract class AbstractInplaceIntroducer<V extends PsiNameIdentifierOwner
@Override
protected boolean performRefactoring() {
if (!ensureValid()) return false;
CommandProcessor.getInstance().executeCommand(myProject, new Runnable() {
WriteCommandAction.runWriteCommandAction(myProject, getCommandName(), getCommandName(), new Runnable() {
@Override
public void run() {
final String refactoringId = getRefactoringId();
@@ -551,7 +551,7 @@ public abstract class AbstractInplaceIntroducer<V extends PsiNameIdentifierOwner
}
performIntroduce();
}
}, getCommandName(), getCommandName());
});
V variable = getVariable();
if (variable != null) {
@@ -871,7 +871,7 @@ public abstract class InplaceRefactoring {
boolean bind = false;
try {
if (!brokenOff) {
bind = ApplicationManager.getApplication().runWriteAction((Computable<Boolean>)InplaceRefactoring.this::performRefactoring);
bind = performRefactoring();
} else {
performCleanup();
}