org.netbeans.modules.editor.indent.spi
Interface ExtraLock
public interface ExtraLock
Extra locking may be necessary for indentation/reformatting
before the document gets write-locked and the actual
indentation/reformatting gets started.
For example java infrastructure requires this.
The infrastructure guarantees this processing:
extraLock.lock();
try {
doc.atomicLock(); // either BaseDocument or e.g. NbDocument.runAtomic()
try {
// indent or reformat ...
} finally {
doc.atomicUnlock();
}
} finally {
extraLock.unlock();
}
lock
void lock()
unlock
void unlock()