[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[m2m-atl-dev] Re: Questions regarding ATL and loading UML2 models (XMI)
- From: Dennis Wagelaar <dennis.wagelaar@xxxxxxxxx>
- Date: Mon, 18 May 2009 13:47:48 +0200
- Delivered-to: email@example.com
- Organization: Vrije Universiteit Brussel
- User-agent: Thunderbird 126.96.36.199 (Macintosh/20090302)
Now I understand where your problem lies: the current ATL no longer uses
a static ResourceSet object. Instead, each EMFModelLoader has an
internal ResourceSet object. The ModelLoader - and hence the ResourceSet
- only exist for the duration of the transformation, after which they
are cleaned up by the garbage collector.
I've tested all this in the ATL 2.1.0 branch (ATL_Dynamic_ResourceSet),
and have recently ported this to HEAD (ATL 3.0). However, HEAD is under
heavy development and cannot be relied upon for production use.
Interfaces are all subject to change, so it's not wise to create
dependencies on HEAD just yet.
If you do want to build on HEAD, check with William Piers, as he does
the main development there.
Dawid Loubser wrote:
Thank you for your reply. I have still not managed to load a UML model
via ATL, but I think I have precisely
tracked down when / where you have made changes (by spending a lot of
time in your CVS history) which breaks our ability to
to access ATL's internal ResourceSet.
First of all, the only code I've seen (based on a couple of mailing
list posts, etc)
that works to load UML2 models relies on
(a static service) to get a handle to the resource set. Via this, we
access the URI mapper and add the
pathmap entries needed in order to load the UML metamodel.
On Dec 16 last year, you merged a CVS branch called
"ATL_Dynamic_ResourceSet" which took away the above mentioned service,
and while you summarised in an e-mail to the
group what the main "changes" were:
Some time ago, I've created the ATL_Dynamic_ResourceSet branch to
deal with the problem I've stated in my e-mail to this list of
September 23rd, 2008. As I've done all the testing I could manage, I
think it's time to open up this code to all ATL developers. I've
you've any objections, please let me know as soon as possible.
Otherwise, I plan to go ahead with the merge next week.
* Models are no longer loaded via an AtlModelHandler. Instead, use an
AtlModelHandler to create a ModelLoader instance. It is recommended
to use only one ModelLoader instance per handler type. After you're
done with running ATL on the loaded models, you can just let go of
the ModelLoader instance and the garbage collector takes care of the
* A call to Resource#unload() has been reintroduced in the UML model
handler to avoid memory leak. I've found no leak in the ATL code and
this leak also does not occur for any other meta-model than UML.
Kind regards, Dennis Wagelaar
There is no mention made of what happened to the service we need. For
some reason, nobody seems to have complained
about this (a.k.a. neither of the other two people in the world who
have tried to transform UML2 models have noticed).
Perhaps if I can get a better understanding of what the whole idea
behind this "dynamic resource sets" are, I
can find out where I can "dynamically plug in entries to the URI
Thank you so much for the help, we are really desperate to get this
working, but have in weeks not managed to load
and transform a UML2 model outside of eclipse - something which is
important for the toolset we are writing.
On 18 May 2009, at 10:10 AM, Dennis Wagelaar wrote:
I've never needed to load UML 2.1 models outside Eclipse, but I know
that the Eclipse UML2 project documentation includes some information
on this. It was something along the lines of manually registering the
UML 2.1 meta-model and XMI loader in the EMF registry.