Stream<Editor> (@NotNull Document document, @Nullable Project project) { return collectAllEditors() .filter(editor -> editor.getDocument().equals(document) && (project == null || project.equals(editor.getProject()))); }