use of org.eclipse.jface.text.IDocumentPartitionerExtension3 in project webtools.sourceediting by eclipse.
the class BasicStructuredDocument method startRewriteSessionOnPartitioners.
/**
* Starts the given rewrite session.
*
* @param session the rewrite session
* @since 2.0
*/
final void startRewriteSessionOnPartitioners(DocumentRewriteSession session) {
if (fDocumentPartitioners != null) {
Iterator e = fDocumentPartitioners.values().iterator();
while (e.hasNext()) {
Object partitioner = e.next();
if (partitioner instanceof IDocumentPartitionerExtension3) {
IDocumentPartitionerExtension3 extension = (IDocumentPartitionerExtension3) partitioner;
extension.startRewriteSession(session);
}
}
}
}
use of org.eclipse.jface.text.IDocumentPartitionerExtension3 in project webtools.sourceediting by eclipse.
the class BasicStructuredDocument method stopRewriteSessionOnPartitioners.
/**
* Stops the given rewrite session.
*
* @param session the rewrite session
* @since 2.0
*/
final void stopRewriteSessionOnPartitioners(DocumentRewriteSession session) {
if (fDocumentPartitioners != null) {
DocumentPartitioningChangedEvent event = new DocumentPartitioningChangedEvent(this);
Iterator e = fDocumentPartitioners.keySet().iterator();
while (e.hasNext()) {
String partitioning = (String) e.next();
IDocumentPartitioner partitioner = (IDocumentPartitioner) fDocumentPartitioners.get(partitioning);
if (partitioner instanceof IDocumentPartitionerExtension3) {
IDocumentPartitionerExtension3 extension = (IDocumentPartitionerExtension3) partitioner;
extension.stopRewriteSession(session);
event.setPartitionChange(partitioning, 0, getLength());
}
}
if (!event.isEmpty())
fireDocumentPartitioningChanged(event);
}
}
Aggregations