Hi Marcos, I'm trying to refactor AMW's code to migrate it to ATL 3.0 API.
I know it's not a simple task, as if not you would have done it already,
but I believe I'm not so far from achieving it.

However, there are still three pieces of code (spread in numerous
classes) which I don't feel confident in changing, as I don't know the
semantics of it and I'm not really ATL's 3.0 API savvy.
Those pieces are:

ASMEMFModel.createMOF(modelLoader) -> you can always do
emfModelLoader.getMOF(), or ASMEMFModel.getMOF(), but I'm not sure if
any of those is semantically the same (the first one having more chances).

I'm also refactoring the AM3 deprecated branch to use this new API. I
changed the dependencies on /org.eclipse.gmt.tcs/ to
/org.eclipse.m2m.atl.drivers.emf4atl.tcs/, do you consider this correct?.
There is also a piece of code in one of AM3's plugins that I don't know
how to refactor, so I asked for guidance on AM3 newsgroup on this
particular one./
/
Also, there might be incompatibilities between ATL 3.0 and AMW that I
might be missing.
Any comments will be much appreciated.
Best regards,
Juan Pedro

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Marcos, I'm trying to refactor AMW's code to migrate it to ATL 3.0
API.<br>
I know it's not a simple task, as if not you would have done it
already, but I believe I'm not so far from achieving it.<br>
<br>
However, there are still three pieces of code (spread in numerous
classes) which I don't feel confident in changing, as I don't know the
semantics of it and I'm not really ATL's 3.0 API savvy.<br>
Those pieces are:<br>
<br>
ASMEMFModel.getResourceSet() -&gt; from <a
href="http://www.eclipse.org/forums/index.php?t=msg&amp ;th=30445&amp;start=0&amp;S=63660089a492a7cfe0c0e55f 2d8d63d6 ">this
thread</a> I get that I can get a resource set from a EMFModelLoader
instance, but I'm not completely sure it is the right type of resource
set.<br>
<br>
ASMEMFModel.loadASMEMFModel(...) &nbsp; -&gt; is
EMFModelLoader.loadModel(..) equivalent?<br>
<br>
ASMEMFModel.createMOF(modelLoader) -&gt; you can always do
emfModelLoader.getMOF(), or ASMEMFModel.getMOF(), but I'm not sure if
any of those is semantically the same (the first one having more
chances).<br>
<br>
I'm also refactoring the AM3 deprecated branch to use this new API. I
changed the dependencies on <i>org.eclipse.gmt.tcs</i> to <i>org.eclipse.m2m.atl.drivers.emf4atl.tcs</i>,
do you consider this correct?.<br>
There is also a piece of code in one of AM3's plugins that I don't know
how to refactor, so I asked for guidance on AM3 newsgroup on this
particular one.<i> <br>
</i><br>
Also, there might be incompatibilities between ATL 3.0 and AMW that I
might be missing. <br>
Any comments will be much appreciated.<br>
Best regards,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Juan Pedro<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>

I haven't worked with the ATL 3.0 API so far, I have just used ATL 2.x
versions, to keep compatibility. I have some comments below.

> ASMEMFModel.getResourceSet()

I think it is OK to get the resourceset like that. However, the
resource sets are the most tricky parts of AMW implementation,
because when it was implemented, we didn't know the EMF API in detail.
The tool don't has a centralized resource set, but one per model and
metamodel. Still, the implementation is centralized in the
ModelManager class. You should verify if there is no undesired effects
when these methods are called in the AMWEditor.

For loading models, you just need to get an EMF model in return, so
EMFModelLoader.loadModel(..) should be OK.

> ASMEMFModel.createMOF(modelLoader) -> you can always do
> emfModelLoader.getMOF(), or ASMEMFModel.getMOF(), but I'm n ot sure if any
of
> those is semantically the same (the first one having more chances).

The two last ones are probably facilities to get the MOF (which is
actually EMF) metametamodel directly, so you could use them as well.

>I'm also refactoring the AM3 deprecated branch to use this new API. I changed
the dependencies on /org.eclipse.gmt.tcs/ to
/org.eclipse.m2m.atl.drivers.emf4atl.tcs/, do you > consider this correct?.

I have done some modifications recently in the code to remove these
dependencies in the AMW code. This simplifies the installation process.
I do a dynamic class load of KM3Injector and Projector. You may take
advantage of that change.

> Also, there might be incompatibilities between ATL 3.0 and AMW that I might
be missing.

Hi Marcos, thanks for you support. :-)
With your answers I managed to get rid of all compilation errors in
AMW's code (at least so far).
I'm still waiting for an answer from the AM3 newsgroup on how to rewrite
the following instructions:

But I'm not confident that it is using the correct vm for sure.
I will hold to see if they answer, if not I'll repost on m2m newsgroup
and see if I get help there.
I will anyhow try out the resulting code with my current modifications
and see the results.