use of org.eclipse.jface.text.rules.IPartitionTokenScanner in project hale by halestudio.
the class GroovySourceViewerUtil method setupDocument.
/**
* Setup a Groovy document.
*
* @param doc the document
*/
public static void setupDocument(IDocument doc) {
IPartitionTokenScanner scanner = new GroovyPartitionScanner();
IDocumentPartitioner partitioner = new FastPartitioner(scanner, GroovyPartitionScanner.LEGAL_CONTENT_TYPES);
doc.setDocumentPartitioner(partitioner);
partitioner.connect(doc);
}
Aggregations