void (final T value) { if (myCommitting) return; myCommitting = true; try { final CommitListener multicaster = myDispatcher.getMulticaster(); multicaster.beforeCommit(this); try { WriteCommandAction.writeCommandAction(getProject(), getDomWrapper().getFile()).run(() -> doCommit(value)); } catch (ReflectiveOperationException e) { LOG.error(e); } multicaster.afterCommit(this); } finally { myCommitting = false; } }