Search in sources :

Example 1 with DefaultPartitioner

use of org.eclipse.jface.text.rules.DefaultPartitioner in project liferay-ide by liferay.

the class DocumentProvider method createDocument.

protected IDocument createDocument(Object element) throws CoreException {
    IDocument document = super.createDocument(element);
    if (document != null) {
        IDocumentPartitioner partitioner = new DefaultPartitioner(new PartitionScanner(), PartitionScanner.PARTITIONS);
        partitioner.connect(document);
        document.setDocumentPartitioner(partitioner);
    }
    return document;
}
Also used : DefaultPartitioner(org.eclipse.jface.text.rules.DefaultPartitioner) IDocumentPartitioner(org.eclipse.jface.text.IDocumentPartitioner) IDocument(org.eclipse.jface.text.IDocument)

Example 2 with DefaultPartitioner

use of org.eclipse.jface.text.rules.DefaultPartitioner in project soot by Sable.

the class JimpleDocumentProvider method createDocument.

/* (non-Javadoc)
	 * Method declared on AbstractDocumentProvider
	 */
protected IDocument createDocument(Object element) throws CoreException {
    IDocument document = super.createDocument(element);
    if (document != null) {
        IDocumentPartitioner partitioner = new DefaultPartitioner(new JimplePartitionScanner(), new String[] { JimplePartitionScanner.JIMPLE_STRING });
        partitioner.connect(document);
        document.setDocumentPartitioner(partitioner);
    }
    return document;
}
Also used : DefaultPartitioner(org.eclipse.jface.text.rules.DefaultPartitioner) IDocumentPartitioner(org.eclipse.jface.text.IDocumentPartitioner) IDocument(org.eclipse.jface.text.IDocument)

Aggregations

IDocument (org.eclipse.jface.text.IDocument)2 IDocumentPartitioner (org.eclipse.jface.text.IDocumentPartitioner)2 DefaultPartitioner (org.eclipse.jface.text.rules.DefaultPartitioner)2