void (AncestorEvent event) { myRoot.removeAncestorListener(this); Project project = CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext(myRoot)); if (project == null) { DataManager.getInstance() .getDataContextFromFocusAsync() .onSuccess(context -> { Project project1 = CommonDataKeys.PROJECT.getData(context); if (project1 == null) { // IDEA-118202 project1 = ProjectManager.getInstance().getDefaultProject(); } setupUrlField(myUrlField, project1); }); } else { setupUrlField(myUrlField, project); } }