StructureConfigurableContext (@NotNull Project project) { if (ApplicationManager.getApplication().isHeadlessEnvironment()) return null; final ProjectStructureConfigurable structureConfigurable = ProjectStructureConfigurable.getInstance(project); return structureConfigurable.isUiInitialized() ? structureConfigurable.getContext() : null; }