org.eclipse.jface.text.rules.DefaultPartitioner Java Examples
The following examples show how to use
org.eclipse.jface.text.rules.DefaultPartitioner.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DocumentUtils.java From http4e with Apache License 2.0 | 6 votes |
public static IDocument createDocument1(){ IDocument doc = new Document(){ public String getDefaultLineDelimiter(){ return String.valueOf(AssistConstants.LINE_DELIM_NL) /*super.getDefaultLineDelimiter()*/; } }; IDocumentPartitioner partitioner = new DefaultPartitioner( new HPartitionScanner(), new String[] { HPartitionScanner.COMMENT, HPartitionScanner.PROPERTY_VALUE}); partitioner.connect(doc); doc.setDocumentPartitioner(partitioner); return doc; }
Example #2
Source File: JimpleDocumentProvider.java From JAADAS with GNU General Public License v3.0 | 5 votes |
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; }
Example #3
Source File: JSDocumentProvider.java From birt with Eclipse Public License 1.0 | 5 votes |
/** * @see DocumentProvider#createDocument(java.lang.Object) */ protected IDocument createDocument( Object element ) throws CoreException { IDocument document = super.createDocument( element ); if ( document != null ) { IDocumentPartitioner partitioner = new DefaultPartitioner( new JSPartitionScanner( ), colorTokens ); partitioner.connect( document ); document.setDocumentPartitioner( partitioner ); } return document; }
Example #4
Source File: XMLDocumentProvider.java From uima-uimaj with Apache License 2.0 | 5 votes |
@Override protected IDocument createDocument(Object element) throws CoreException { IDocument document = super.createDocument(element); if (document != null) { IDocumentPartitioner partitioner = new DefaultPartitioner(new XMLPartitionScanner(), new String[] { XMLPartitionScanner.XML_TAG, XMLPartitionScanner.XML_COMMENT }); partitioner.connect(document); document.setDocumentPartitioner(partitioner); } return document; }