Closed delvh closed 3 years ago
@delvh thanks for submitting this issue. Would you please submit a PR with the remediation actions you have proposed, and I'll happily merge it for you.
(The original author is no longer maintaining UndoFX, I just happen to have access because it's linked to RichTextFX.)
Problem
I just started using UndoFX, and I consistently got an
IllegalStateException
without knowing why. Through much debugging and by looking at #7, I finally figured out that the parameter of theapply
function is supposed to be reinserted into the event stream inside the apply function. This is however nowhere documented.Responsible Code (
UndoManagerImpl
)Possible remediation actions
Many minor things can be added to improve this situation:
performingAction.suspendWhile(() -> apply.accept(change));
undo
(I think it is not needed forredo
)README
, at best in the section for theapply
functionany or all of which detailing that the change is expected to be reinserted in the event stream during the undo action.