Merge remote-tracking branch 'origin/master'

This commit is contained in:
Vladimir.Orlov
2016-03-18 11:21:14 +03:00
3 changed files with 3 additions and 12 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();
}
@@ -490,15 +490,6 @@ public abstract class VcsVFSListener implements Disposable {
if (myCommandLevel == 0) {
if (!myAddedFiles.isEmpty() || !myDeletedFiles.isEmpty() || !myDeletedWithoutConfirmFiles.isEmpty() || !myMovedFiles.isEmpty() ||
! myDirtyFiles.isEmpty()) {
// avoid reentering commandFinished handler - saving the documents may cause a "before file deletion" event firing,
// which will cause closing the text editor, which will itself run a command that will be caught by this listener
myCommandLevel++;
try {
FileDocumentManager.getInstance().saveAllDocuments();
}
finally {
myCommandLevel--;
}
doNotDeleteAddedCopiedOrMovedFiles();
checkMovedAddedSourceBack();
if (!myAddedFiles.isEmpty()) {