Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Re: Best practice: Modifying model in ok/cancel dialog.
Re: Best practice: Modifying model in ok/cancel dialog. [message #427758] Sat, 28 February 2009 20:11 Go to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi Kai,

You should use EMF-Commands and EMFEditDatabinding and then you use the
CommandStack to undo your modifications.

Take a look at an addon for EditingDomain I provide as part of my
Example project [1].

ISavePointEditingDomain[2]: Is an extension to the standard editing
domain allow you to set save points similar
to what you do in databases.

ISavePoint[3]: for commit and rollback

SavePointEditingDomain[4]: a contrete implementation wrapping an
existing domain

Usage is quite simple:

public class BookDialog extends TitleAreaDialog {
private Book book;
private Library library;
private ISavePointEditingDomain domain;
private ISavePoint savePoint;

public BookDialog(Shell parentShell, ISavePointEditingDomain domain,
Library library,
Book book) {
super(parentShell);
this.book = book;
this.library = library;
this.domain = domain;
}

@Override
public int open() {
savePoint = domain.addSavePoint(EcoreUtil.generateUUID());
return super.open();
}

@Override
protected void okPressed() {
savePoint.dispose();
super.okPressed();
}

@Override
protected void cancelPressed() {
if( savePoint.canRollback() ) {
savePoint.rollback();
super.cancelPressed();
} else {
MessageDialog.openInformation(getShell(), "Rollback failed", "An
error occurred while rolling back to the save point!");
}
}
}

See BookDialog [5] as an example.

Tom


[1]http://github.com/tomsontom/emf-databinding-example
[2] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/ISavePointEditingDomain.java
[3] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/ISavePoint.java
[4] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/internal/SavePointEditingDomain.java
[5] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl es.library.databinding.stock/src/org/eclipse/emf/examples/li brary/databinding/stock/dialog/BookDialog.java

Kai Schlamp schrieb:
> Hello.
>
> I run into this problem over and over again and wonder how you guys do
> this.
> I have a dialog to edit a model. So I pass the model to the dialog by
> it's constructor. The model should only be updated when the ok button is
> pressed.
> It's really easy when the dialog only contains simple SWT controls like
> text fields and so on. Then I mostly use data binding with an
> UpdateValueStrategy.POLICY_ON_REQUEST that allows me to use
> DataBindingContext.updateModels() when ok is pressed.
> But the problem starts when using JFace viewers. There is no
> DataBindingContext and no UpdateValueStrategy.
> So I deep copy my model objects (quite easily as I use EMF models with
> the help of EcoreUtil) and give the copy as input to the viewer.
> From now on every modification is done on the copy of the model object.
> When the ok button is pressed everything is synchronized back to the
> source model object. This last step is quite ugly (often large code as
> my models are sometimes quite large and have many children) and error
> prone.
> As I use EMF models I also take ChangeRecorder (a problem for me as I
> use CDO objects), the Edit Framework or the upcoming EPatch into
> consideration.
> But how do you solve this problem?
>
> Best regards,
> Kai
Re: Best practice: Modifying model in ok/cancel dialog + CDO rollback [message #427760 is a reply to message #427758] Sun, 01 March 2009 13:55 Go to previous messageGo to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
How about using CDO stuff for that? As my models are also CDO objects,
can I use CDOUserTransaction.setSavepoint() when the dialog open and
then use CDOUserTransaction.rollback(CDOSavepoint savepoint)?
This way I don't need any EditingDomain or use any Commands when
modifying the models myself (withoud databinding).
Just want to see all possible options.

Best regards,
Kai

Tom Schindl schrieb:
> Hi Kai,
>
> You should use EMF-Commands and EMFEditDatabinding and then you use the
> CommandStack to undo your modifications.
>
> Take a look at an addon for EditingDomain I provide as part of my
> Example project [1].
>
> ISavePointEditingDomain[2]: Is an extension to the standard editing
> domain allow you to set save points similar
> to what you do in databases.
>
> ISavePoint[3]: for commit and rollback
>
> SavePointEditingDomain[4]: a contrete implementation wrapping an
> existing domain
>
> Usage is quite simple:
>
> public class BookDialog extends TitleAreaDialog {
> private Book book;
> private Library library;
> private ISavePointEditingDomain domain;
> private ISavePoint savePoint;
>
> public BookDialog(Shell parentShell, ISavePointEditingDomain domain,
> Library library,
> Book book) {
> super(parentShell);
> this.book = book;
> this.library = library;
> this.domain = domain;
> }
>
> @Override
> public int open() {
> savePoint = domain.addSavePoint(EcoreUtil.generateUUID());
> return super.open();
> }
>
> @Override
> protected void okPressed() {
> savePoint.dispose();
> super.okPressed();
> }
>
> @Override
> protected void cancelPressed() {
> if( savePoint.canRollback() ) {
> savePoint.rollback();
> super.cancelPressed();
> } else {
> MessageDialog.openInformation(getShell(), "Rollback failed", "An
> error occurred while rolling back to the save point!");
> }
> }
> }
>
> See BookDialog [5] as an example.
>
> Tom
>
>
> [1]http://github.com/tomsontom/emf-databinding-example
> [2] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/ISavePointEditingDomain.java
>
> [3] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/ISavePoint.java
>
> [4] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/internal/SavePointEditingDomain.java
>
> [5] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl es.library.databinding.stock/src/org/eclipse/emf/examples/li brary/databinding/stock/dialog/BookDialog.java
>
>
> Kai Schlamp schrieb:
>> Hello.
>>
>> I run into this problem over and over again and wonder how you guys do
>> this.
>> I have a dialog to edit a model. So I pass the model to the dialog by
>> it's constructor. The model should only be updated when the ok button
>> is pressed.
>> It's really easy when the dialog only contains simple SWT controls
>> like text fields and so on. Then I mostly use data binding with an
>> UpdateValueStrategy.POLICY_ON_REQUEST that allows me to use
>> DataBindingContext.updateModels() when ok is pressed.
>> But the problem starts when using JFace viewers. There is no
>> DataBindingContext and no UpdateValueStrategy.
>> So I deep copy my model objects (quite easily as I use EMF models with
>> the help of EcoreUtil) and give the copy as input to the viewer.
>> From now on every modification is done on the copy of the model object.
>> When the ok button is pressed everything is synchronized back to the
>> source model object. This last step is quite ugly (often large code as
>> my models are sometimes quite large and have many children) and error
>> prone.
>> As I use EMF models I also take ChangeRecorder (a problem for me as I
>> use CDO objects), the Edit Framework or the upcoming EPatch into
>> consideration.
>> But how do you solve this problem?
>>
>> Best regards,
>> Kai
Re: Best practice: Modifying model in ok/cancel dialog + CDO rollback [message #427761 is a reply to message #427760] Sun, 01 March 2009 14:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Kai,

It's even possible to use a ChangeRecorder (like the ChangeCommand does)
and make use of ChangeDescription.apply to undo all the recorded changes.


Kai Schlamp wrote:
> How about using CDO stuff for that? As my models are also CDO objects,
> can I use CDOUserTransaction.setSavepoint() when the dialog open and
> then use CDOUserTransaction.rollback(CDOSavepoint savepoint)?
> This way I don't need any EditingDomain or use any Commands when
> modifying the models myself (withoud databinding).
> Just want to see all possible options.
>
> Best regards,
> Kai
>
> Tom Schindl schrieb:
>> Hi Kai,
>>
>> You should use EMF-Commands and EMFEditDatabinding and then you use
>> the CommandStack to undo your modifications.
>>
>> Take a look at an addon for EditingDomain I provide as part of my
>> Example project [1].
>>
>> ISavePointEditingDomain[2]: Is an extension to the standard editing
>> domain allow you to set save points similar
>> to what you do in databases.
>>
>> ISavePoint[3]: for commit and rollback
>>
>> SavePointEditingDomain[4]: a contrete implementation wrapping an
>> existing domain
>>
>> Usage is quite simple:
>>
>> public class BookDialog extends TitleAreaDialog {
>> private Book book;
>> private Library library;
>> private ISavePointEditingDomain domain;
>> private ISavePoint savePoint;
>>
>> public BookDialog(Shell parentShell, ISavePointEditingDomain domain,
>> Library library,
>> Book book) {
>> super(parentShell);
>> this.book = book;
>> this.library = library;
>> this.domain = domain;
>> }
>>
>> @Override
>> public int open() {
>> savePoint = domain.addSavePoint(EcoreUtil.generateUUID());
>> return super.open();
>> }
>>
>> @Override
>> protected void okPressed() {
>> savePoint.dispose();
>> super.okPressed();
>> }
>>
>> @Override
>> protected void cancelPressed() {
>> if( savePoint.canRollback() ) {
>> savePoint.rollback();
>> super.cancelPressed();
>> } else {
>> MessageDialog.openInformation(getShell(), "Rollback failed",
>> "An error occurred while rolling back to the save point!");
>> }
>> }
>> }
>>
>> See BookDialog [5] as an example.
>>
>> Tom
>>
>>
>> [1]http://github.com/tomsontom/emf-databinding-example
>> [2] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/ISavePointEditingDomain.java
>>
>> [3] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/ISavePoint.java
>>
>> [4] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/internal/SavePointEditingDomain.java
>>
>> [5] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl es.library.databinding.stock/src/org/eclipse/emf/examples/li brary/databinding/stock/dialog/BookDialog.java
>>
>>
>> Kai Schlamp schrieb:
>>> Hello.
>>>
>>> I run into this problem over and over again and wonder how you guys
>>> do this.
>>> I have a dialog to edit a model. So I pass the model to the dialog
>>> by it's constructor. The model should only be updated when the ok
>>> button is pressed.
>>> It's really easy when the dialog only contains simple SWT controls
>>> like text fields and so on. Then I mostly use data binding with an
>>> UpdateValueStrategy.POLICY_ON_REQUEST that allows me to use
>>> DataBindingContext.updateModels() when ok is pressed.
>>> But the problem starts when using JFace viewers. There is no
>>> DataBindingContext and no UpdateValueStrategy.
>>> So I deep copy my model objects (quite easily as I use EMF models
>>> with the help of EcoreUtil) and give the copy as input to the viewer.
>>> From now on every modification is done on the copy of the model
>>> object.
>>> When the ok button is pressed everything is synchronized back to the
>>> source model object. This last step is quite ugly (often large code
>>> as my models are sometimes quite large and have many children) and
>>> error prone.
>>> As I use EMF models I also take ChangeRecorder (a problem for me as
>>> I use CDO objects), the Edit Framework or the upcoming EPatch into
>>> consideration.
>>> But how do you solve this problem?
>>>
>>> Best regards,
>>> Kai


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Best practice: Modifying model in ok/cancel dialog + CDO rollback [message #427762 is a reply to message #427761] Sun, 01 March 2009 14:39 Go to previous messageGo to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Ed Merks wrote:
> Kai,
>
> It's even possible to use a ChangeRecorder (like the ChangeCommand does)
> and make use of ChangeDescription.apply to undo all the recorded changes.

But then there are some conflicts with CDO when using a
ChangeSubscriptionPolicy with CDOAdapterPolicy.ALL.

So, if my model only consists of CDO objects then CDO rollback seems to
be the most easiest way (needs no editing domain, no commands, works
with CDO objects), or? Any disadvantages by doing it that way?

>
>
> Kai Schlamp wrote:
>> How about using CDO stuff for that? As my models are also CDO objects,
>> can I use CDOUserTransaction.setSavepoint() when the dialog open and
>> then use CDOUserTransaction.rollback(CDOSavepoint savepoint)?
>> This way I don't need any EditingDomain or use any Commands when
>> modifying the models myself (withoud databinding).
>> Just want to see all possible options.
>>
>> Best regards,
>> Kai
>>
>> Tom Schindl schrieb:
>>> Hi Kai,
>>>
>>> You should use EMF-Commands and EMFEditDatabinding and then you use
>>> the CommandStack to undo your modifications.
>>>
>>> Take a look at an addon for EditingDomain I provide as part of my
>>> Example project [1].
>>>
>>> ISavePointEditingDomain[2]: Is an extension to the standard editing
>>> domain allow you to set save points similar
>>> to what you do in databases.
>>>
>>> ISavePoint[3]: for commit and rollback
>>>
>>> SavePointEditingDomain[4]: a contrete implementation wrapping an
>>> existing domain
>>>
>>> Usage is quite simple:
>>>
>>> public class BookDialog extends TitleAreaDialog {
>>> private Book book;
>>> private Library library;
>>> private ISavePointEditingDomain domain;
>>> private ISavePoint savePoint;
>>>
>>> public BookDialog(Shell parentShell, ISavePointEditingDomain domain,
>>> Library library,
>>> Book book) {
>>> super(parentShell);
>>> this.book = book;
>>> this.library = library;
>>> this.domain = domain;
>>> }
>>>
>>> @Override
>>> public int open() {
>>> savePoint = domain.addSavePoint(EcoreUtil.generateUUID());
>>> return super.open();
>>> }
>>>
>>> @Override
>>> protected void okPressed() {
>>> savePoint.dispose();
>>> super.okPressed();
>>> }
>>>
>>> @Override
>>> protected void cancelPressed() {
>>> if( savePoint.canRollback() ) {
>>> savePoint.rollback();
>>> super.cancelPressed();
>>> } else {
>>> MessageDialog.openInformation(getShell(), "Rollback failed",
>>> "An error occurred while rolling back to the save point!");
>>> }
>>> }
>>> }
>>>
>>> See BookDialog [5] as an example.
>>>
>>> Tom
>>>
>>>
>>> [1]http://github.com/tomsontom/emf-databinding-example
>>> [2] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/ISavePointEditingDomain.java
>>>
>>> [3] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/ISavePoint.java
>>>
>>> [4] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/internal/SavePointEditingDomain.java
>>>
>>> [5] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl es.library.databinding.stock/src/org/eclipse/emf/examples/li brary/databinding/stock/dialog/BookDialog.java
>>>
>>>
>>> Kai Schlamp schrieb:
>>>> Hello.
>>>>
>>>> I run into this problem over and over again and wonder how you guys
>>>> do this.
>>>> I have a dialog to edit a model. So I pass the model to the dialog
>>>> by it's constructor. The model should only be updated when the ok
>>>> button is pressed.
>>>> It's really easy when the dialog only contains simple SWT controls
>>>> like text fields and so on. Then I mostly use data binding with an
>>>> UpdateValueStrategy.POLICY_ON_REQUEST that allows me to use
>>>> DataBindingContext.updateModels() when ok is pressed.
>>>> But the problem starts when using JFace viewers. There is no
>>>> DataBindingContext and no UpdateValueStrategy.
>>>> So I deep copy my model objects (quite easily as I use EMF models
>>>> with the help of EcoreUtil) and give the copy as input to the viewer.
>>>> From now on every modification is done on the copy of the model
>>>> object.
>>>> When the ok button is pressed everything is synchronized back to the
>>>> source model object. This last step is quite ugly (often large code
>>>> as my models are sometimes quite large and have many children) and
>>>> error prone.
>>>> As I use EMF models I also take ChangeRecorder (a problem for me as
>>>> I use CDO objects), the Edit Framework or the upcoming EPatch into
>>>> consideration.
>>>> But how do you solve this problem?
>>>>
>>>> Best regards,
>>>> Kai
Re: Best practice: Modifying model in ok/cancel dialog + CDO rollback [message #427763 is a reply to message #427762] Sun, 01 March 2009 16:27 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Kai,

Comments below.

Kai Schlamp wrote:
> Ed Merks wrote:
>> Kai,
>>
>> It's even possible to use a ChangeRecorder (like the ChangeCommand
>> does) and make use of ChangeDescription.apply to undo all the
>> recorded changes.
>
> But then there are some conflicts with CDO when using a
> ChangeSubscriptionPolicy with CDOAdapterPolicy.ALL.
As far as CDO would be concerned it would look like yet more changes and
it would just so happen that the net result of all those changes would
be a big no-op. I only suggested it so you'd know about yet more
options. This option would work for any model...
>
> So, if my model only consists of CDO objects then CDO rollback seems
> to be the most easiest way (needs no editing domain, no commands,
> works with CDO objects), or? Any disadvantages by doing it that way?
I'm quite sure that's true. I can't think of any disadvantages offhand.
>
>>
>>
>> Kai Schlamp wrote:
>>> How about using CDO stuff for that? As my models are also CDO
>>> objects, can I use CDOUserTransaction.setSavepoint() when the dialog
>>> open and then use CDOUserTransaction.rollback(CDOSavepoint savepoint)?
>>> This way I don't need any EditingDomain or use any Commands when
>>> modifying the models myself (withoud databinding).
>>> Just want to see all possible options.
>>>
>>> Best regards,
>>> Kai
>>>
>>> Tom Schindl schrieb:
>>>> Hi Kai,
>>>>
>>>> You should use EMF-Commands and EMFEditDatabinding and then you use
>>>> the CommandStack to undo your modifications.
>>>>
>>>> Take a look at an addon for EditingDomain I provide as part of my
>>>> Example project [1].
>>>>
>>>> ISavePointEditingDomain[2]: Is an extension to the standard editing
>>>> domain allow you to set save points
>>>> similar
>>>> to what you do in databases.
>>>>
>>>> ISavePoint[3]: for commit and rollback
>>>>
>>>> SavePointEditingDomain[4]: a contrete implementation wrapping an
>>>> existing domain
>>>>
>>>> Usage is quite simple:
>>>>
>>>> public class BookDialog extends TitleAreaDialog {
>>>> private Book book;
>>>> private Library library;
>>>> private ISavePointEditingDomain domain;
>>>> private ISavePoint savePoint;
>>>>
>>>> public BookDialog(Shell parentShell, ISavePointEditingDomain domain,
>>>> Library library,
>>>> Book book) {
>>>> super(parentShell);
>>>> this.book = book;
>>>> this.library = library;
>>>> this.domain = domain;
>>>> }
>>>>
>>>> @Override
>>>> public int open() {
>>>> savePoint = domain.addSavePoint(EcoreUtil.generateUUID());
>>>> return super.open();
>>>> }
>>>>
>>>> @Override
>>>> protected void okPressed() {
>>>> savePoint.dispose();
>>>> super.okPressed();
>>>> }
>>>>
>>>> @Override
>>>> protected void cancelPressed() {
>>>> if( savePoint.canRollback() ) {
>>>> savePoint.rollback();
>>>> super.cancelPressed();
>>>> } else {
>>>> MessageDialog.openInformation(getShell(), "Rollback failed",
>>>> "An error occurred while rolling back to the save point!");
>>>> }
>>>> }
>>>> }
>>>>
>>>> See BookDialog [5] as an example.
>>>>
>>>> Tom
>>>>
>>>>
>>>> [1]http://github.com/tomsontom/emf-databinding-example
>>>> [2] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/ISavePointEditingDomain.java
>>>>
>>>> [3] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/ISavePoint.java
>>>>
>>>> [4] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl e.library.service/src/org/eclipse/emf/example/library/servic e/internal/SavePointEditingDomain.java
>>>>
>>>> [5] http://github.com/tomsontom/emf-databinding-example/blob/5b9 05e2c7bf4dda12fa2ffa44d80227e87bf734b/org.eclipse.emf.exampl es.library.databinding.stock/src/org/eclipse/emf/examples/li brary/databinding/stock/dialog/BookDialog.java
>>>>
>>>>
>>>> Kai Schlamp schrieb:
>>>>> Hello.
>>>>>
>>>>> I run into this problem over and over again and wonder how you
>>>>> guys do this.
>>>>> I have a dialog to edit a model. So I pass the model to the dialog
>>>>> by it's constructor. The model should only be updated when the ok
>>>>> button is pressed.
>>>>> It's really easy when the dialog only contains simple SWT controls
>>>>> like text fields and so on. Then I mostly use data binding with an
>>>>> UpdateValueStrategy.POLICY_ON_REQUEST that allows me to use
>>>>> DataBindingContext.updateModels() when ok is pressed.
>>>>> But the problem starts when using JFace viewers. There is no
>>>>> DataBindingContext and no UpdateValueStrategy.
>>>>> So I deep copy my model objects (quite easily as I use EMF models
>>>>> with the help of EcoreUtil) and give the copy as input to the viewer.
>>>>> From now on every modification is done on the copy of the model
>>>>> object.
>>>>> When the ok button is pressed everything is synchronized back to
>>>>> the source model object. This last step is quite ugly (often large
>>>>> code as my models are sometimes quite large and have many
>>>>> children) and error prone.
>>>>> As I use EMF models I also take ChangeRecorder (a problem for me
>>>>> as I use CDO objects), the Edit Framework or the upcoming EPatch
>>>>> into consideration.
>>>>> But how do you solve this problem?
>>>>>
>>>>> Best regards,
>>>>> Kai


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Effect of Ecore properties on generated hiberante mapping
Next Topic:[CDO]CDO Server product export error
Goto Forum:
  


Current Time: Fri Apr 26 18:00:21 GMT 2024

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

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

Back to the top