beforeCommitListener or preCommit?

I see that it is possible to modify the commit context using either a DsContext beforeCommitListener or by overriding preCommit() in an AbstractEditor screen.

Is one preferrable to the other - and why (so I can learn)?

In DsContext.BeforeCommitListener#beforeCommit you have direct access to the collection of committed entities, so I think it is a preferable way, at least from the point of view of API convenience.

OK, thanks.