);
}
private void newDocFromRmdTemplate(final NewRMarkdownDialog.Result result)
{
final RmdChosenTemplate template = result.getFromTemplate();
if (template.createDir())
{
rmarkdown_.createDraftFromTemplate(template);
return;
}
rmarkdown_.getTemplateContent(template,
new OperationWithInput<String>() {
@Override
public void execute(final String content)
{
if (content.length() == 0)
globalDisplay_.showErrorMessage("Template Content Missing",
"The template at " + template.getTemplatePath() +
" is missing.");
newDoc(FileTypeRegistry.RMARKDOWN, content, null);
}
});
}