public final class EditorDocumentUtils extends Object
|Modifier and Type||Method and Description|
Execute a non mutating runnable under an exclusive document lock over the document (no other read locks or write locks are taking place).
runExclusive(Document, Runnable)are allowed. The given runnable may also call
Document.insertString(int, String, javax.swing.text.AttributeSet)or
Document.remove(int, int)are prohibited.
runExclusive(Document, Runnable)within an atomic section are allowed (but no document mutations may be done during runExclusive() call).
runExclusive(Document, Runnable)are allowed.
Document.render(java.lang.Runnable)are prohibited and may lead to starvation.
doc- document being exclusively locked. For non-editor document implementations (currently
org.netbeans.editor.BaseDocument) the implementation synchronizes over the document and does not check for mutations within runExclusive().
r- runnable to be performed. It is not allowed to mutate the document by any insertions or removals.
IllegalStateException- in case the given runnable wants to mutate the document.
Built on August 25 2014. | Portions Copyright 1997-2014 Oracle. All rights reserved.