Project (@Nullable Project project) { if (project == null || !LightEdit.owns(project)) { LOG.error("LightEdit project is expected while " + (project != null ? project.getName() : "no project") + " is used instead"); throw new IllegalStateException("Missing LightEdit project"); } return project; }