use of org.stepik.plugin.projectWizard.idea.StepModuleBuilder in project intellij-plugins by StepicOrg.
the class ModuleUtils method createStepModule.
static void createStepModule(@NotNull Project project, @NotNull StepNode step, @NotNull ModifiableModuleModel moduleModel) {
StudyNode lesson = step.getParent();
if (lesson != null) {
String moduleDir = String.join("/", project.getBasePath(), lesson.getPath());
StepModuleBuilder stepModuleBuilder = new StepModuleBuilder(moduleDir, step);
try {
stepModuleBuilder.createModule(moduleModel);
} catch (IOException | ModuleWithNameAlreadyExists | JDOMException | ConfigurationException e) {
logger.warn("Cannot create step: " + step.getDirectory(), e);
}
}
}
Aggregations