assert that refactoring is not started under write action; check validity (EA-66799 - PIEAE: StubBasedPsiElementBase.getContainingFile)

This commit is contained in:
Anna Kozlova
2015-03-23 20:33:21 +01:00
parent 8a56a94ff1
commit 5c9b57ea2f
2 changed files with 2 additions and 0 deletions
@@ -543,6 +543,7 @@ public abstract class BaseRefactoringProcessor implements Runnable {
return;
}
if (ApplicationManager.getApplication().isWriteAccessAllowed()) {
LOG.info(new Exception());
DumbService.getInstance(myProject).smartInvokeLater(new Runnable() {
@Override
public void run() {
@@ -122,6 +122,7 @@ public class RenameProcessor extends BaseRefactoringProcessor {
@Override
public void doRun() {
if (!myPrimaryElement.isValid()) return;
prepareRenaming(myPrimaryElement, myNewName, myAllRenames);
super.doRun();