public void connect(Object element) throws CoreException {
super.connect(element);
IDocument document = getDocument(element);
if (document != null) {
if (document.getDocumentPartitioner() == null) {
IDocumentPartitioner partitioner = new ATGPartitionerAdaptor(new FastATGPartitionScannerAdaptor());
partitioner.connect(document);
document.setDocumentPartitioner(partitioner);
}
} else {
System.err.println("Unable to get the document!");
}