use of org.eclipse.jface.text.IDocumentPartitioner in project statecharts by Yakindu.
the class StyledTextXtextAdapter method initXtextDocument.
protected void initXtextDocument(XtextFakeResourceContext context) {
getXtextDocument().setInput(context.getFakeResource());
IDocumentPartitioner partitioner = getDocumentPartitioner().get();
partitioner.connect(getXtextDocument());
getXtextDocument().setDocumentPartitioner(partitioner);
}
use of org.eclipse.jface.text.IDocumentPartitioner in project erlide_eclipse by erlang.
the class ErlangDocumentSetupParticipant method setupErlangDocumentPartitioner.
public void setupErlangDocumentPartitioner(final IDocument document, final String partitioning) {
final IDocumentPartitioner partitioner = ErlangDocumentSetupParticipant.createDocumentPartitioner();
if (document instanceof IDocumentExtension3) {
final IDocumentExtension3 extension3 = (IDocumentExtension3) document;
extension3.setDocumentPartitioner(partitioning, partitioner);
} else {
document.setDocumentPartitioner(partitioner);
}
partitioner.connect(document);
}
Aggregations