protected IDocument createDocument(Object element) throws CoreException {
IDocument document = super.createDocument(element);
if (document != null) {
IDocumentPartitioner partitioner = new FastPartitioner(
new ParameterFilePartitionScanner(), new String[] {
ParameterFilePartitionScanner.PARAMETER_COMMENT,
ParameterFilePartitionScanner.PARAMETER_NAME,
ParameterFilePartitionScanner.PARAMETER_VALUE,
ParameterFilePartitionScanner.PARAMETER_EMPTY });
partitioner.connect(document);
document.setDocumentPartitioner(partitioner);
// Associate this IDocument with a ParameterTree model object.
parameterTree = new ParameterTree(document);
}