void (long delta) { // session can be null in e.g., inspection batch mode if (myHighlightingSession != null) { long current = myProgressCount.addAndGet(delta); if (current >= myNextChunkThreshold.get() && current >= myNextChunkThreshold.updateAndGet(old -> current >= old ? old+Math.max(1, myProgressLimit / 100) : old)) { myHighlightInfoProcessor.progressIsAdvanced(myHighlightingSession, getEditor(), getProgress()); } } }