void (@NotNull Project project, @NotNull Editor editor) { Project editorProject = editor.getProject(); if (editorProject != null && editorProject != project) { throw new IllegalArgumentException("Inconsistent editor/project combination: the editor belongs to " + editorProject + "; but passed project=" + project); } }