boolean (@NotNull Project project) { FileDocumentManagerImpl manager = (FileDocumentManagerImpl)getInstance(); if (!manager.myUnsavedDocuments.isEmpty()) { manager.myOnClose = true; try { manager.saveAllDocuments(); } finally { manager.myOnClose = false; } } return manager.myUnsavedDocuments.isEmpty(); }