public class FeatureDocumentProvider extends FileDocumentProvider {
protected IDocument createDocument(Object element) throws CoreException {
IDocument document = super.createDocument(element);
if (document != null) {
IDocumentPartitioner partitioner = new FastPartitioner(new CucumberPartitionScanner(), new String[] {
CucumberPartitionScanner.COMMENT, CucumberPartitionScanner.TAG, CucumberPartitionScanner.SCENARIO,
CucumberPartitionScanner.FEATURE});
partitioner.connect(document);
document.setDocumentPartitioner(partitioner);
}