It is claimed that:
In order for the waypoints to work correctly, you need to set one both before AND after you perform the action that should be able to be undone.
What is actually meant here (I assume) is that if you have one plugin that doesn’t use ChangeHistoryService and performs work A, then you have another plugin that performs work B and sets a waypoint properly, then if you undo it will revert both work A and B rather than just work B.
This should be documented as such; the reader should not be misled into thinking the function doesn’t properly set a waypoint when you only call it once after the work, just because of some plugins that don’t correctly use ChangeHistoryService. Describing why you actually might want to call twice will improve the quality of the description and make the functionality of SetWaypoint clearer.
It should also be documented that SetWaypoint will not actually create a waypoint if no changes were made since the last waypoint. (Otherwise, it is not clear that I won’t have to undo twice when I set a waypoint before and after the work.)
PS: Also, the same text appears above and below the code in the article.