void (@NotNull Project project, boolean isLastProjectClosed) { collectAllEditors().forEach(editor -> { if (editor.getProject() == project || (editor.getProject() == null && isLastProjectClosed)) { try { throwNotReleasedError(editor); } finally { releaseEditor(editor); } } }); }