Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHow to realise an undo for Element Propertys ...
https://www.eclipse.org/forums/index.php/mv/msg/76551/238694/#msg_238694
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 ?]]>Daniel Stein2007-09-27T07:17:20-00:00Re: How to realise an undo for Element Propertys ...
https://www.eclipse.org/forums/index.php/mv/msg/76551/238716/#msg_238716
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------090602090201050502050201
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Daniel,
Although it would likely require a lot of rework, it sounds like your
application would likely have benefited from using EMF and GMF. The
online tutorial will let you very rapidly build a prototype so you can
assess the value of taking that approach.
<http://wiki.eclipse.org/index.php/GMF_Documentation>
Full undo and redo support is effectively generated for you for all your
model changes.
Daniel Stein wrote:
> 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 ?
>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Daniel,<br>
<br>
Although it would likely require a lot of rework, it sounds like your
application would likely have benefited from using EMF and GMF. The
online tutorial will let you very rapidly build a prototype so you can
assess the value of taking that approach. <a
href="http://wiki.eclipse.org/index.php/GMF_Documentation"><br>
</a>
<blockquote><a
href="http://wiki.eclipse.org/index.php/GMF_Documentation">http://wiki.eclipse.org/index.php/GMF_Documentation</a><br>
</blockquote>
Full undo and redo support is effectively generated for you for all
your model changes.<br>
<br>
<br>
Daniel Stein wrote:
<blockquote
cite="mid:68145401.54851190877471297.JavaMail.root@cp9.dzone.com"
type="cite">
<pre wrap="">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 ?
</pre>
</blockquote>
<br>
</body>
</html>