if (document != null) { JavaTextTools tools= JavaPlugin.getDefault().getJavaTextTools(); IDocumentPartitioner partitioner= tools.createDocumentPartitioner(); document.setDocumentPartitioner(partitioner); partitioner.connect(document); }
initializeDocument(document);
	protected IDocument createDocument(Object element) throws CoreException {		IDocument document= super.createDocument(element);		if (document != null) {			JavaTextTools tools= JavaPlugin.getDefault().getJavaTextTools();			IDocumentPartitioner partitioner= tools.createDocumentPartitioner();			document.setDocumentPartitioner(partitioner);			partitioner.connect(document);		}				return document;	}