void () { WriteCommandAction.runWriteCommandAction(null, new Runnable() { @Override public void run() { FileDocumentManager.getInstance().saveAllDocuments(); for (VirtualFile file : myFixture.getTempDirFixture().getFile("").getChildren()) { try { file.delete(this); } catch (IOException e) { throw new RuntimeException(e); } } } }); }