This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Steps to reproduce: - Create the new Synch project (type of project doesn't matter) - Open Bpel process in the diagram view - Add a new Fault Handler to the process - Add a new Catch to the Fault Handler - Add a new Empty element to the Catch - Put the focus to the Catch. - Put the focus to the property sheet (open it if it's required) - change the Fault Name property in the property sheet (property doesn't matter) - Put the focus back to the Catch element on the diagram - Invoke the Undo action (Ctrl+Z) As a result the Fault Name property is clared and the Empty element is removed. Only the first action is antisipated. - Then invoke the Redo action (Ctrl+Y) The Empty element is recreated but the Fault Name property remains empty. So it's another problem that the original state is broken after Undo+Redo.
Denis Anisimov sayd me that it behave such way because of the diagram has personal Undo manager and it is unsubscribed from the BPEL model when the diagram view lost the focus. And just it happens when the user pass focus from the diagram to the property sheet. So the changes are made in the property sheet become out of the Undo/Redo scope. I suppose the algorithm of subscribing/unsubscribing should be more sophisticated. It also necessary to take into consideration, that changes can be made in a property editor dialog which can be called from different places, for example, from the navigator.
This is very serious bug I beleive. It should be fixed in release55 branch. User cannot perform correclty undo after changes via property editor. There can be two desisions: 1) One need to do the same as done for Navigator. One need to add UndoRedoManager as listner to OM when navigator takes focus ( activated ) . And remove it when propepty loose focus. 2) Other decision could be : before any changes that are performed via property editor one need also to add UndoRedoManager and delete them after changes are commited to OM. The problem is actually the same as for absent UndoRedo for Mapper.
This will be fixed as part of fix for IZ87521. But this problem could appear again in future after changing implementation ( if it will happen ) for adding/removing undoable change listener to/from OM. So it could be external responsibility : add or remove undoable change listener to/from OM when property sheet will obtain/lost focus. Currently all works due staying undo manager as listener for OM when some "design" view ( diagram, navigator,.. , not source ) are visible and was acitive before focus lost.
Fixed as part of fix for IZ87521.
Could not reproduce - verified