fastPartitioner.connect(doc);
TextPresentation textPresentation = new TextPresentation();
PyCodeScanner scanner = new PyCodeScanner(colorCache);
try {
ITypedRegion[] computePartitioning = fastPartitioner.computePartitioning(0, doc.getLength());
for (ITypedRegion region : computePartitioning) {
String type = region.getType();
int offset = region.getOffset();
int len = region.getLength();
if (IPythonPartitions.PY_DEFAULT.equals(type) || type == null) {