"Couldn't determine the format options from the YAML front " +
"matter. Make sure the YAML defines a supported output " +
"format in its 'output' field.");
return;
}
RmdTemplateOptionsDialog dialog =
new RmdTemplateOptionsDialog(selTemplate.template,
selTemplate.format,
data.getFrontMatter(),
getPath() == null ? null : FileSystemItem.createFile(getPath()),
selTemplate.isShiny,
new OperationWithInput<RmdTemplateOptionsDialog.Result>()
{
@Override
public void execute(RmdTemplateOptionsDialog.Result in)
{
// when the dialog is completed successfully, apply the new
// front matter
applyRmdFrontMatter(in);
}
},
new Operation()
{
@Override
public void execute()
{
// when the dialog is cancelled, update the view's format list
// (to cancel in-place changes)
updateRmdFormatList();
}
});
dialog.showModal();
}