Hey Guys, So, the user list shamed me into giving more time into adding the Undo feature to JMeter. I would appreciate some feedback if what I am thinking will work.
I was first looking at the setProperty methods, but I found that it doesn't work well because those don't get called until you switch GUI Panels or Save the Test Plan. So, my thinking is to utilize an ActionListener for the TextFields, check boxes, etc so that I can be notified with the text has changed. I would use recursion to add this ActionListener inside one of the Abstract Gui classes's configure method to avoid touching all the TestElement Gui classes. From inside the ActionListener, I would capture the before and after value changes of the elements and update and Undo Manager. I was thinking to subclass UndoManager into a JMeterUndoManager and have it live/referenced from the GuiPackage class. Managing the TestPlan Tree for Adds and Deletes will be out of scope for my first patch. Does this sound workable? I don't think the extra recursion will hurt the Gui performance that much since the Gui classes are pretty small with a very specific scope. Thanks, Anthony