Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[bpel-dev] Undo stacks patch

Hi,

Since the time we have source editor in BPEL editor the following
problem has arised: two editors having two different command stacks,
which are somewhat independent. (Actually text editor stack was always
filled with "Undo text change" that was the result of updating DOM
from EMF). I've rewritten the way that undo actions are handled. The
primary editor for undo is now text editor and all the changes are
recorded using dom recording mechanism and they're undone using text
editor undo stack.

The following issues had been resolved:
- undoing change made in design view from the source tab resulted in
inability to undo anything due to the way how the changes from EMF
were propagated to DOM
- undo/redo shortcuts (Ctrl-Z, Ctrl-Y) were not working and there was
no undo/redo in the 'Edit' menu
- editor was not marked dirty when all contents is removed from source tab
- editor sometimes was opened in dirty state
- editor got dirty after pasting xml data on an activity in design
view, yet file was unchanged

There are still two issues left:
- the selection is not restored after undoing delete. I consider this
a minor issue and continue working on it
- editor is not marked clean after all changes are undone. This is an
known issue in StructuredTextEditor (Eclipse bugzilla entries: 213109,
138100, 191754) and I've asked about it on the WTP dev list

Also, from now instead of using
org.eclipse.gef.commands.CompoundCommand one should prefer using
org.eclipse.bpel.ui.commands.CompoundCommand.
org.eclipse.bpel.ui.commands.CompoundCommand has the same
functionality as the gef one, but it handles changes in all contained
commands as a single change, not breaking into several commands. This
allows to undo compound command (for example, insertion of a new
activity) in a single undo action, not undoing them one by one (like
undoing set activity name and then insertion of a new activity)

Oleg, could you please verify and commit these changes?

And if Oleg accepts these changes I'm asking everyone to take a look
and to report any bugs with undo mechanism to me in case you find any.
I'll fix them ASAP.

Thanks,
Dennis


Back to the top