Search in sources :

Example 1 with DocGeneratorOptions

use of com.evolveum.midpoint.studio.impl.DocGeneratorOptions in project midpoint-studio by Evolveum.

the class DocumentationDialog method getOptions.

public DocGeneratorOptions getOptions() {
    DocGeneratorOptions opts = new DocGeneratorOptions();
    if (sourceDirectory.getText() != null) {
        opts.setSourceDirectory(new File(sourceDirectory.getText()));
    }
    List<String> lines = parseRows(include);
    opts.setInclude(lines);
    lines = parseRows(exclude);
    opts.setExclude(lines);
    opts.setExportFormat((ExportFormat) exportFormat.getSelectedItem());
    if (output.getText() != null) {
        opts.setExportOutput(new File(output.getText()));
    }
    return opts;
}
Also used : DocGeneratorOptions(com.evolveum.midpoint.studio.impl.DocGeneratorOptions) File(java.io.File)

Example 2 with DocGeneratorOptions

use of com.evolveum.midpoint.studio.impl.DocGeneratorOptions 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);
}
Also used : DocGeneratorOptions(com.evolveum.midpoint.studio.impl.DocGeneratorOptions) MidPointService(com.evolveum.midpoint.studio.impl.MidPointService) DocumentationDialog(com.evolveum.midpoint.studio.ui.DocumentationDialog) GenerateOptions(com.evolveum.midscribe.generator.GenerateOptions) File(java.io.File) MidPointSettings(com.evolveum.midpoint.studio.impl.MidPointSettings)

Aggregations

DocGeneratorOptions (com.evolveum.midpoint.studio.impl.DocGeneratorOptions)2 File (java.io.File)2 MidPointService (com.evolveum.midpoint.studio.impl.MidPointService)1 MidPointSettings (com.evolveum.midpoint.studio.impl.MidPointSettings)1 DocumentationDialog (com.evolveum.midpoint.studio.ui.DocumentationDialog)1 GenerateOptions (com.evolveum.midscribe.generator.GenerateOptions)1