Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Transient preprocessing modifications on model before a subsequent transformation
Transient preprocessing modifications on model before a subsequent transformation [message #1431027] Thu, 25 September 2014 05:45 Go to next message
Marc-Florian Wendland is currently offline Marc-Florian WendlandFriend
Messages: 81
Registered: January 2013
Member
Dear all,

what would be the best way to preprocess (i.e., perform some structural
optimizations) a model before feeding it into a subsequent transformation?
The optimizations shall be transient in a way that they should not be
persistent. After the transformation (into a different model or text file),
the source model shall remain in its origin state.

We are in the context of a transactional resource, so every change I have to
do will go immediately into persistence when the command is executed and put
onto the command stack. I already thought about rolling back the optimizing
transaction after the transformation has been performed, but this solutions
seems not to be the best way. I was wondering whether there is a more
lightweight solutions for such kind of preprocessing optimizations (which, I
think, are rather common).

Thanks for any hint in advance,
Marc-Florian
Re: Transient preprocessing modifications on model before a subsequent transformation [message #1432026 is a reply to message #1431027] Fri, 26 September 2014 13:53 Go to previous messageGo to next message
Leonid Ripeynih is currently offline Leonid RipeynihFriend
Messages: 144
Registered: February 2012
Senior Member
We're usually copying the model before such optimizations and transformations.
Re: Transient preprocessing modifications on model before a subsequent transformation [message #1432127 is a reply to message #1432026] Fri, 26 September 2014 17:12 Go to previous messageGo to next message
Marc-Florian Wendland is currently offline Marc-Florian WendlandFriend
Messages: 81
Registered: January 2013
Member
Hi Leonid,

thanks for you reply. Do you use the EcoreUtil.Copier functionality or a
proprietary implementation?

Best regards,
marc-Florian

"Leonid Ripeynih" wrote in message news:m03r3t$plk$1@xxxxxxxxe.org...

We're usually copying the model before such optimizations and
transformations.
Re: Transient preprocessing modifications on model before a subsequent transformation [message #1446153 is a reply to message #1432127] Thu, 16 October 2014 12:46 Go to previous message
Leonid Ripeynih is currently offline Leonid RipeynihFriend
Messages: 144
Registered: February 2012
Senior Member
In general it's a standard copier. Sometimes (for some specific tasks, or in case this optimization is possible) we're using a custom shallow-copier, which does not copies containment references, but thats a rare use case.
Previous Topic:[XCore][PlantUML] Visualizing .xcore models as diagrams
Next Topic:EMF Maven repos (again)
Goto Forum:
  


Current Time: Wed Nov 22 05:53:23 GMT 2017

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

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