public Writer createWriter(ProjectContext context) throws WritingError {
Repository r = context.repositories.get(term.identifier);
if (r == null) {
throw new WritingError(String.format("no repository %s", term.identifier));
}
WriterCreator wc = r.writerCreator;
Ui.Task t = AppContext.RUN.ui.pushTask(
"create_writer",
String.format("Creating Writer \"%s\"", term));
try {
Writer writer = wc.create(term.options);
AppContext.RUN.ui.popTaskAndPersist(t, writer.getRoot());
return writer;
} catch (WritingError e) {
AppContext.RUN.ui.error(e, "Error creating writer");
throw e;