/*
* Textual and semantic updates cannot be done in the same IUnitOfWork (throws an
* IllegalStateException), so index updates (semantic) are done first and tracked in the
* commentsToUpdate list, then a 2nd IUnitOfWork processes the comment updates (textual).
*/
document.modify(new IUnitOfWork.Void<XtextResource>() {
@Override public void process(XtextResource resource) {
Protobuf root = resources.rootOf(resource);
if (!protobufs.isProto2(root) /*|| !resource.getErrors().isEmpty()*/) {
return;
}