Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » AMW » Migrating AMW to use ATL 3.0 API.
Migrating AMW to use ATL 3.0 API. [message #482710] Thu, 27 August 2009 16:24 Go to next message
Juan Pedro Silva is currently offline Juan Pedro SilvaFriend
Messages: 258
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000700070503070709090008
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

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.getResourceSet() -> from this thread
< http://www.eclipse.org/forums/index.php?t=msg&th=30445&a mp;start=0&S=63660089a492a7cfe0c0e55f2d8d63d6>
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.

ASMEMFModel.loadASMEMFModel(...) -> is EMFModelLoader.loadModel(..)
equivalent?

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






--------------000700070503070709090008
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!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>

--------------000700070503070709090008--
Re: Migrating AMW to use ATL 3.0 API. [message #482812 is a reply to message #482710] Fri, 28 August 2009 07:46 Go to previous messageGo to next message
Marcos Didonet Del Fabro is currently offline Marcos Didonet Del FabroFriend
Messages: 84
Registered: July 2009
Member
Hi Juan,

this is a nice initiative!!

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.

> ASMEMFModel.loadASMEMFModel(...) -> is EMFModelLoader.loadModel(..)
equivalent?

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.

Probably :). Check specially the AMW transformation plugins, which
executes ATL
transformations.

Once finished (and tested), it may be a possibility to contribute to
the AMW code, for instance, buy proposing a patch through Bugzilla.

Regards,

Marcos.
Re: Migrating AMW to use ATL 3.0 API. [message #482904 is a reply to message #482812] Fri, 28 August 2009 13:50 Go to previous message
Juan Pedro Silva is currently offline Juan Pedro SilvaFriend
Messages: 258
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050006060306070907010508
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

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:

vm = AtlVM.ATLVM_REGULAR;
AtlVM.getVM(vm).launch(asmUrl, libs, models, params, superimps, options);

as AtlVM class no longer exists.
I wrote:

AtlLauncher.getDefault().launch(asmUrl, libs, models, params, superimps,
options);

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.

I'll get back with my findings.
Regards,
Juan Pedro


Marcos Didonet Del Fabro escribi
Previous Topic:Facing problems in model tranformation
Next Topic:Re: Refactoring deprecated AM3 branch and AMW model handler to use ATL 3.0 API
Goto Forum:
  


Current Time: Fri Apr 19 18:21:41 GMT 2024

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

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

Back to the top