Skip to main content


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 07:17 Go to next message
Daniel Stein is currently offline Daniel SteinFriend
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 14:58 Go to previous message
Eclipse UserFriend
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 Apr 26 21:27:36 GMT 2024

Powered by FUDForum. Page generated in 0.02940 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top