.getValue().getFormat();
if (StringUtil.isNullOrEmpty(format))
format = CompileNotebookv2Options.FORMAT_DEFAULT;
}
CompileNotebookv2OptionsDialog dialog =
new CompileNotebookv2OptionsDialog(
format,
new OperationWithInput<CompileNotebookv2Options>()
{
@Override
public void execute(CompileNotebookv2Options input)
{
renderNotebookv2(sourceDoc, input.getFormat());
// save options for this document
HashMap<String, String> changedProperties
= new HashMap<String, String>();
changedProperties.put(NOTEBOOK_FORMAT, input.getFormat());
sourceDoc.modifyProperties(changedProperties, null);
// save global prefs
CompileNotebookv2Prefs prefs =
CompileNotebookv2Prefs.create(input.getFormat());
if (!CompileNotebookv2Prefs.areEqual(
prefs,
prefs_.compileNotebookv2Options().getValue()))
{
prefs_.compileNotebookv2Options().setGlobalValue(prefs);
prefs_.writeUIPrefs();
}
}
}
);
dialog.showModal();
}