void (boolean batchMode, @NotNull Runnable operation) { EditorImpl.assertIsDispatchThread(); if (myInBatchMode || !batchMode) { operation.run(); } else { try { notifyBatchModeStarting(); myInBatchMode = true; operation.run(); } finally { myInBatchMode = false; notifyBatchModeFinished(); } } }