use of com.evolveum.midscribe.generator.GenerateOptions in project midpoint-studio by Evolveum.
the class DocGeneratorOptions method buildGenerateOptions.
public static GenerateOptions buildGenerateOptions(DocGeneratorOptions opts) {
GenerateOptions go = new GenerateOptions();
go.setAdocOutput(opts.getAdocOutput());
go.setExportFormat(opts.getExportFormat());
go.setTemplate(opts.getTemplate());
go.setExportOutput(opts.getExportOutput());
go.setSourceDirectory(List.of(opts.getSourceDirectory()));
go.setInclude(opts.getInclude());
go.setExclude(opts.getExclude());
return go;
}
use of com.evolveum.midscribe.generator.GenerateOptions in project midpoint-studio by Evolveum.
the class DocumentationAction method actionPerformed.
@Override
public void actionPerformed(@NotNull AnActionEvent evt) {
MidPointService mm = MidPointService.getInstance(evt.getProject());
MidPointSettings settings = mm.getSettings();
DocGeneratorOptions opts = settings.getDocGeneratorOptions();
if (opts == null) {
opts = DocGeneratorOptions.createDefaultOptions(evt.getProject());
}
DocumentationDialog dialog = new DocumentationDialog(evt.getProject(), opts);
if (!dialog.showAndGet()) {
return;
}
opts = dialog.getOptions();
settings.setDocGeneratorOptions(opts);
mm.settingsUpdated();
GenerateOptions options = DocGeneratorOptions.buildGenerateOptions(opts);
File exportOutput = opts.getExportOutput();
File adocOutput = new File(exportOutput.getParent(), exportOutput.getName() + ".adoc");
options.setAdocOutput(adocOutput);
this.options = options;
super.actionPerformed(evt);
}
Aggregations