Closed tinevez closed 6 years ago
Any chance we can generalize the undo logic so that all of ImageJ2 can benefit? Or is it too big of a project? See imagej/imagej-common#3
@ctrueden Some notes explaining the mastodon undo framework: https://gist.github.com/tpietzsch/b597b2ad8062d52dcad375a810473523 It has kind of a "hybrid" undo history (as mentioned in imagej/imagej-common#3) so the general ideas seem applicable. That being said, the mastodon undo framework is in its second (and possibly not final) iteration, still too rough that I would recommend it as a starting point for generalization.
the mastodon undo framework is in its second (and possibly not final) iteration, still too rough that I would recommend it as a starting point for generalization.
Perhaps we could revisit then after it iterates a couple more times? Please just keep it in mind for the future of ImageJ2, that if you can make a general enough undo framework, we could push it to the SciJava layer in the future.
Or maybe to put another way: Mastodon can serve as a big use case for how flexible a general SciJava undo framework would need to be in order to support its requirements for undo. Reading over your notes, we probably want (some day) a general undo framework in SciJava with plugins. And Mastodon simply implements such a plugin using its scheme described in your gist, no?
Thanks guys!
@tpietzsch We can close this issue right? You addressed it all in the last weeks if I remember correctly.
👍
As of now, only properties of the
Model
are undoable because the recorder are created at model construction time.TagSet
s are based onPropertyMap
s so they could be made undoable, but right now it does not work because they are not registered in theGraphUndoRecorder