Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Preserve the unsaved changes on ecore editor during an external m2m transformation
Preserve the unsaved changes on ecore editor during an external m2m transformation [message #1719065] Mon, 04 January 2016 20:43 Go to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member
While the ecore editor is still under editing by the user, I want to be able to apply a m2m transformation on the model.

At the same time, I want to preserve the undaved changes.

Any clue of how to do this, will be very helpful.

I am aware of the conflicts that would rise. I will deal with those conflicts later.

For now, I think this is the way I should proceed. Get the saved state of the model, apply the transformation and then reset the unsaved changes.



/Uma

[Updated on: Mon, 04 January 2016 20:57]

Report message to a moderator

Re: Preserve the unsaved changes on ecore editor during an external m2m transformation [message #1719069 is a reply to message #1719065] Mon, 04 January 2016 21:52 Go to previous messageGo to next message
Pavel Vlasov is currently offline Pavel VlasovFriend
Messages: 23
Registered: December 2015
Junior Member
I think it may be done in the following manner:
- Take unsaved user changes an undo them
- Apply tansformation
- Redo changes
Re: Preserve the unsaved changes on ecore editor during an external m2m transformation [message #1719071 is a reply to message #1719069] Mon, 04 January 2016 21:57 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member
Hi Pavel,

How can and capture the unsaved changes and redo them programmatically?


Re: Preserve the unsaved changes on ecore editor during an external m2m transformation [message #1719138 is a reply to message #1719065] Tue, 05 January 2016 15:13 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
I don't really understand the goal. You want to save the changes, apply
the transformation to those changes, but you don't want the editor to
then reload and show those changes?

On 04/01/2016 9:43 PM, UmaShankar Subramani wrote:
> While the ecore editor is still under editing by the user, I want to
> be able to apply a m2m transformation on the model.
>
> At the same time, I want to preserve the undaved changes.
>
> Any clue of how to do this, will be very helpful.
>
> I am aware of the conflicts that would rise. I will deal with those
> conflicts later.
>
> For now, I want to get the saved state of the model, apply the
> transformation and then reset the unsaved changes.
>
>
> /Uma


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Preserve the unsaved changes on ecore editor during an external m2m transformation [message #1719142 is a reply to message #1719138] Tue, 05 January 2016 15:31 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member
Hi Ed,

I am sorry. I did not explain it clearly.

Consider the following:

ABCF The saved state of the model

ABCE*F is the new state(E is newly added and the state is unsaved)

Transformation wants to add "D" next to C so it takes the
Saved state ABCF and adds "D"

After transformation the result will be ABCDF

Ar the same time the unsaved change should also be applied
To the model. So that it becomes
ABCDE*F (but not ABCDEF)

[Updated on: Tue, 05 January 2016 15:32]

Report message to a moderator

Re: Preserve the unsaved changes on ecore editor during an external m2m transformation [message #1719252 is a reply to message #1719142] Wed, 06 January 2016 15:42 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
It's a diff/merge problem. It will not be easily solved and I won't be
able to help you solve it.

On 05/01/2016 4:31 PM, UmaShankar Subramani wrote:
> Hi Ed,
>
> I am sorry. I did not explain it clearly.
>
> Consider the following:
>
> ABCF The saved statenof the model
>
> ABCE*F is the new state(E is newly added and the state is unsaved)
>
> Transformation wants to add "D" next to C so it takes the Saved state
> ABCF and adds "D"
>
> After transformation the result will be ABCDF
>
> Ar the same time the unsaved change should also be applied
> To the model. So that it becomes ABCDE*F (but not ABCDEF)


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] ClassCastException for StaleReferenceProxy
Next Topic:Alternate forms of persistence
Goto Forum:
  


Current Time: Fri Apr 26 01:03:53 GMT 2024

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

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

Back to the top