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.

Bug 87100 - Undo/Redo works wrong if changes are made in the property sheet
Summary: Undo/Redo works wrong if changes are made in the property sheet
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on:
Blocks: 87558
  Show dependency tree
 
Reported: 2006-10-13 14:05 UTC by Nikita Krjukov
Modified: 2007-02-16 16:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Krjukov 2006-10-13 14:05:12 UTC
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.
Comment 1 Nikita Krjukov 2006-10-13 14:15:25 UTC
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. 

Comment 2 Denis Anisimov 2006-10-13 14:50:39 UTC
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. 
Comment 3 Denis Anisimov 2006-10-20 11:50:22 UTC
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.
Comment 4 Denis Anisimov 2006-10-20 12:56:49 UTC
Fixed as part of fix for IZ87521.
Comment 5 Mikhail Kondratyev 2007-02-16 16:40:19 UTC
Could not reproduce - verified