void (@NotNull ModifiableRootModel rootModel) { Project project = rootModel.getProject(); if (!project.isInitialized()) { StartupManager.getInstance(project).runAfterOpened(() -> doAddGroovySample(rootModel)); } else { doAddGroovySample(rootModel); } }