Search in sources :

Example 1 with DockerPartitionScanner

use of org.eclipse.linuxtools.internal.docker.editor.scanner.DockerPartitionScanner in project linuxtools by eclipse.

the class DockerDocumentProvider method createDocument.

@Override
protected IDocument createDocument(Object element) throws CoreException {
    IDocument document = super.createDocument(element);
    if (document != null) {
        DockerPartitionScanner scanner = new DockerPartitionScanner();
        IDocumentPartitioner partitioner = new FastPartitioner(scanner, DockerPartitionScanner.ALLOWED_CONTENT_TYPES);
        partitioner.connect(document);
        document.setDocumentPartitioner(partitioner);
    }
    return document;
}
Also used : IDocumentPartitioner(org.eclipse.jface.text.IDocumentPartitioner) FastPartitioner(org.eclipse.jface.text.rules.FastPartitioner) DockerPartitionScanner(org.eclipse.linuxtools.internal.docker.editor.scanner.DockerPartitionScanner) IDocument(org.eclipse.jface.text.IDocument)

Aggregations

IDocument (org.eclipse.jface.text.IDocument)1 IDocumentPartitioner (org.eclipse.jface.text.IDocumentPartitioner)1 FastPartitioner (org.eclipse.jface.text.rules.FastPartitioner)1 DockerPartitionScanner (org.eclipse.linuxtools.internal.docker.editor.scanner.DockerPartitionScanner)1