if (regionsToFormat == null || regionsToFormat.length == 0) {
if (doc instanceof IDocumentExtension4) {
IDocumentExtension4 ext = (IDocumentExtension4) doc;
session = ext.startRewriteSession(DocumentRewriteSessionType.STRICTLY_SEQUENTIAL);
}
participant.formatAll(doc, pyEdit, true, throwSyntaxError);
} else {
if (doc instanceof IDocumentExtension4) {
IDocumentExtension4 ext = (IDocumentExtension4) doc;
session = ext.startRewriteSession(DocumentRewriteSessionType.SEQUENTIAL);