protected IDocument createDocument(Object element) throws CoreException {
IDocument document = super.createDocument(element);
if (document != null) {
IDocumentPartitioner partitioner =
new FastPartitioner(
new PartitionScanner(),
PartitionType.PARTITION_TYPES);
partitioner.connect(document);
document.setDocumentPartitioner(partitioner);
}
return document;