void () { LeafBlockWrapper blockWrapper = myBlocksToModify.get(myIndex); myShift = FormatProcessorUtils.replaceWhiteSpace( myModel, blockWrapper, myShift, blockWrapper.getWhiteSpace().generateWhiteSpace(myBlockIndentOptions.getIndentOptions(blockWrapper)), myBlockIndentOptions.getIndentOptions() ); myProgressCallback.afterApplyingChange(blockWrapper); // block could be gc'd blockWrapper.getParent().dispose(); blockWrapper.dispose(); myBlocksToModify.set(myIndex, null); myIndex++; if (myIndex >= myBlocksToModify.size()) { setDone(true); } }