void () { if (!ApplicationManager.getApplication().isUnitTestMode()) { throw new RuntimeException("This method is only for test mode!"); } ApplicationManager.getApplication().assertWriteAccessAllowed(); if (!myUnsavedDocuments.isEmpty()) { for (Document document : myUnsavedDocuments) { VirtualFile file = getFile(document); if (file == null) continue; unbindFileFromDocument(file, document); } myUnsavedDocuments.clear(); myMultiCaster.unsavedDocumentsDropped(); } }