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 a new BPEL module - open BPEL in designer - switch to source - add one more <empty/> tag - switch back to designer - press Ctrl+Z The tag will be removed from source but not from the diagram. The diagram and source will be out of sync.
It seems this is the problem that I discovered in other steps. Original could be: <reply/> <receive/> then one add empty: <reply/> <empty/> <receive/> sync ( go to designer f.e. ) remove via source "empty" back : <reply/> <receive/> sync. You will get one more "receive". I'm sure that this is the same problem. This is XML team bug. I will monitor its state.
*** Issue 79620 has been marked as a duplicate of this issue. ***
Denis, In the debugger I can see that XDMModel did fire the delete/add events during undo/redo. Somehow BpelModelImp.XDMListener (override xdm/xam XDMListener) never receive the events, maybe it wasn't listening. Since BpelModelImpl override sync and transaction support, I am not sure this issue should be in xml/xdm,xam? Could you please analyse further in your code and tell us what went wrong, if any, in xdm? Please reevaluate and reassign properly.
Nam, I don't know , may be there exist my problems also , but I see behavior that is strange in XAM/XDM. Let me describe other way for reproduce this bug and what I see from my point of view. Simple description: 1) create BPEL module. 2) go to source 3) remove <empty> element. 4) go to designer and perfroem "undo". As result - source is correct , but diagram is not updated. So what happened from my view: you are right that I have my own XDMListener. But it just additional listener that is not override behavior of XDMListener that used in XDMModel for handling merge events. This listener I connect to model access only in sync - you are right also here . So I didn't get any events in this listener while undo. BUT I don't need this listener at all for getting events about OM elements added/deleted. Because if I correctly understand SyncUpdater should call corresponding method "update" with correct parent and child. Is it true ? I belive this is true. But such method is not called. Moreover XDMListener that is implemented inside XDM should call at lest method "fireComponentChangedEvent" of AbstractModel class. But I see that this method is not called. Method "sync" is overriden. But as I understand it is not called in "undo" action. "undo" method is also overriden but it call "super.undo" and all work that is performed inside "super undo" should be done independently from my code. As I already said at least method "fireComponentChangedEvent" should be called. I will add my XDMListener while "undo" working and check "merge event" appearance here. I will report later about it.
I'm sorry. That's my fault. There was not started update at all when "sync" is performed. In method "undoableEditHappened()" of OM impl there was incorrect check for "inSync" flag. There should be check for "inUndoRedo" flag. If it is not set then we need to start update ( call to "beginUpdate()" method of UndableEditSupport ).
Verified in build 17