boolean (@NotNull VirtualFile file, @NotNull String newName) { if (!isMyVcs(file)) return false; startOperation(file); File srcFile = getIOFile(file); File dstFile = new File(srcFile.getParentFile(), newName); // save all documents here when !myMovedFiles.isEmpty() deletes these files from VFS // these leads to psi invalidation during refactoring inside write action // FileDocumentManager.getInstance().saveAllDocuments(); myFilesToRefresh.add(file.getParent()); return doMove(srcFile, dstFile); }