|How to realise an undo for Element Propertys ... [message #238694]
||Thu, 27 September 2007 03:17
| Daniel Stein
Registered: July 2009
Hi everyone. |
I'm developing an GEF Application to edit "Buisness Models".
One Task in the model is represented by an Figure. Each Task has various propertys, like name, time of execution etc. I've implemented an view (ViewPart) with an TableViewer and different CellEditors. I need TextCellEditors an ComboBoxCellEditors in combination. This is the reason why I don't use the standard Eclipse PropertyView.
When a User selects an Figure, the propertys are shown in the described View. So far everything works perfect.
But I want to implement an undo / redo Function for the property changes.
The solution, that I figured out is not very satisfying:
When an Editor gets visible, the view asks the editor for the Command Stack. If an Cell is modified an Command is executed to change the property. A command Stack Listener takes care of refreshing the Propertys Table Viewer, when an "Property Change Command" was executed.
But this strategy causes a lot of problems.
So short question: Is there a proper way in GEF to solve the described problem ?