Home » Archived » M2M (model-to-model transformation) » [ATL] Code completion for ATL editor, when?
[ATL] Code completion for ATL editor, when? [message #24227] |
Sun, 18 March 2007 18:41  |
Eclipse User |
|
|
|
Hi all,
for the users of AndroMDA who write ATL transformations, we need
metamodel-based code completion in the ATL editor plug-in for Eclipse.
The names of all metaclasses with their properties and operations
should be available when the user strikes Ctrl-Space.
Is this on the ATL roadmap?
Cheers,
Matthias
|
|
|
Re: [ATL] Code completion for ATL editor, when? [message #25376 is a reply to message #24227] |
Fri, 23 March 2007 18:27   |
Eclipse User |
|
|
|
Hi Matthias,
A prerequisite to code completion is to have a type inference engine for
ATL.
It is definitely possible to implement such an engine in Java. We would
be glad to integrate such a contribution, should somebody offer it.
However, we are considering other solutions (i.e., model-based), which
are likely to take longer to develop, but should improve model
engineering techniques.
Best regards,
Frédéric Jouault
Matthias Bohlen wrote:
> Hi all,
>
> for the users of AndroMDA who write ATL transformations, we need
> metamodel-based code completion in the ATL editor plug-in for Eclipse.
> The names of all metaclasses with their properties and operations should
> be available when the user strikes Ctrl-Space.
>
> Is this on the ATL roadmap?
>
> Cheers,
> Matthias
>
|
|
|
Re: [ATL] Code completion for ATL editor, when? [message #25614 is a reply to message #25376] |
Mon, 26 March 2007 04:25   |
Eclipse User |
|
|
|
On 2007-03-23 23:27:51 +0100, Frédéric Jouault
<frederic.jouault@univ-nantes.fr> said:
> A prerequisite to code completion is to have a type inference engine for ATL.
Hi Frédéric,
what do you mean by "type inference engine"? I thought, code completion
would only be a matter of finding out which attributes and methods are
available on a metaclass instance, like MOFScript does it in its editor
plugin. So, if I had to do it, I would simply try to copy the code from
MOFScript and adjust it a little so that it fits into ATL.
One obstacle might be that inside the ATL script, you don't know which
metamodel is behind a metamodel name. So, it would be necessary to
examine a launch configuration or something equivalent.
Cheers,
Matthias
|
|
|
Re: [ATL] Code completion for ATL editor, when? [message #25652 is a reply to message #25614] |
Mon, 26 March 2007 08:56  |
Eclipse User |
|
|
|
Hi Matthias,
> what do you mean by "type inference engine"? I thought, code completion
> would only be a matter of finding out which attributes and methods are
> available on a metaclass instance
Well, that part is relatively easy. The most difficult part is knowing
what is the metaclass that types your expression.
> , like MOFScript does it in its editor
> plugin. So, if I had to do it, I would simply try to copy the code from
> MOFScript and adjust it a little so that it fits into ATL.
I am not sure how MOFScript does it, but according to its user guide,
code completion is only activated for metamodel or variable references
(i.e., when you can know the type of the expression without inference
because it is the type declared in the variable definition).
It seems that writing a piece of Java code to implement such a (very)
partial code completion on ATL programs would be relatively easy.
However, whereas it probably makes sense for MOFScript, ATL programs
almost always contain more complex OCL expressions. As an ATL user, I
would probably me more frustrated to have such a partial solution than
none at all :-).
Moreover, as I said in my previous post, such a solution is not that
interesting from my point of view, because it does not use model
engineering principles.
That said, should someone contribute a code completion plugin for ATL
(even a partial one), we would be happy to make it available.
> One obstacle might be that inside the ATL script, you don't know which
> metamodel is behind a metamodel name. So, it would be necessary to
> examine a launch configuration or something equivalent.
For this purpose, as well as for the purpose of type-checking (which is
another somewhat related issue), we indeed need to consider the
transformation with respect to specific source and target metamodels. A
better solution than reading the launch configurations would be to
attach this information as metadata to the transformation. This is one
thing AM3 will be able to do.
Cheers,
Frédéric
|
|
|
Goto Forum:
Current Time: Wed Apr 16 02:44:25 EDT 2025
Powered by FUDForum. Page generated in 0.04445 seconds
|