Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to realise an undo for Element Propertys ...
How to realise an undo for Element Propertys ... [message #238694] Thu, 27 September 2007 03:17 Go to next message
Daniel Stein is currently offline Daniel Stein
Messages: 11
Registered: July 2009
Junior Member
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 ?
Re: How to realise an undo for Element Propertys ... [message #238716 is a reply to message #238694] Thu, 27 September 2007 10:58 Go to previous message
Eclipse User
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>

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 ?
>


--------------090602090201050502050201
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!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.&nbsp; The
online tutorial will let you very rapidly build a prototype so you can
assess the value of taking that approach.&nbsp;&nbsp; <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>

--------------090602090201050502050201--
Previous Topic:Mapping ConnectionAnchors with Connections
Next Topic:numeric characters in Arabic os
Goto Forum:
  


Current Time: Fri Aug 01 20:45:38 EDT 2014

Powered by FUDForum. Page generated in 0.21122 seconds