Home » Modeling » TMF (Xtext) » Suggestion - custom post processing
Suggestion - custom post processing [message #53391] |
Sat, 27 June 2009 07:30  |
Eclipse User |
|
|
|
Eclipse has ATL and QVT/OML for M2M transformations as alternatives to
Xtend.
A possible future enhancement for Xtext would be to change the generator
to allow plugging in ATL or QVT/OML transformations as alternatives to
expecting the "<MyDsl>PostProcessor.ext" Xtend file.
Choice of M2M technology for post processing would make it easier for
users who already know ATL or QVT and don't want to learn Xtend and its
type and expression systems just for post processing, or who prefer the
alternative M2M technologies. Xtend type system also has some issues with
custom EDataTypes.
Any thoughts?
|
|
|
Re: Suggestion - custom post processing [message #53529 is a reply to message #53391] |
Sat, 27 June 2009 14:36   |
Eclipse User |
|
|
|
Hi Porter,
the current post processing implementation is quite nice, because it
allows the editor to know about the modifications, that are performend
in the post processing step.
However, I'm not that familiar with ATL or QVT, but expect them to be
interpreted as well, so please feel free to file an enhancement request.
But I guess we will not prioritize it very high. It is more likely that
we'll fix the issues with custom data types. Again: Tickets are welcome.
Regards,
Sebastian
Am 27.06.2009 13:30 Uhr, schrieb Porter:
> Eclipse has ATL and QVT/OML for M2M transformations as alternatives to
> Xtend.
>
> A possible future enhancement for Xtext would be to change the generator
> to allow plugging in ATL or QVT/OML transformations as alternatives to
> expecting the "<MyDsl>PostProcessor.ext" Xtend file.
>
> Choice of M2M technology for post processing would make it easier for
> users who already know ATL or QVT and don't want to learn Xtend and its
> type and expression systems just for post processing, or who prefer the
> alternative M2M technologies. Xtend type system also has some issues
> with custom EDataTypes.
>
> Any thoughts?
>
>
>
|
|
|
Re: Suggestion - custom post processing [message #53788 is a reply to message #53529] |
Sun, 28 June 2009 03:08   |
Eclipse User |
|
|
|
Hi Porter,
Also note that you should be able to declare a single JAVA extension in
your PostProcessor.ext and that way delegate to ATL or QVT.
--knut
Sebastian Zarnekow wrote:
> Hi Porter,
> the current post processing implementation is quite nice, because it
> allows the editor to know about the modifications, that are performend
> in the post processing step.
> However, I'm not that familiar with ATL or QVT, but expect them to be
> interpreted as well, so please feel free to file an enhancement request.
> But I guess we will not prioritize it very high. It is more likely that
> we'll fix the issues with custom data types. Again: Tickets are welcome.
> Regards,
> Sebastian
> Am 27.06.2009 13:30 Uhr, schrieb Porter:
>> Eclipse has ATL and QVT/OML for M2M transformations as alternatives to
>> Xtend.
>>
>> A possible future enhancement for Xtext would be to change the generator
>> to allow plugging in ATL or QVT/OML transformations as alternatives to
>> expecting the "<MyDsl>PostProcessor.ext" Xtend file.
>>
>> Choice of M2M technology for post processing would make it easier for
>> users who already know ATL or QVT and don't want to learn Xtend and its
>> type and expression systems just for post processing, or who prefer the
>> alternative M2M technologies. Xtend type system also has some issues
>> with custom EDataTypes.
>>
>> Any thoughts?
>>
>>
>>
|
|
|
Re: Suggestion - custom post processing [message #53842 is a reply to message #53788] |
Sun, 28 June 2009 09:04   |
Eclipse User |
|
|
|
Hi Knut,
we better don't use JAVA extensions in this context, because they cannot
be used/loaded by the IDE (the classes or not on the classpath of the
process but they are somewhere in the workspace).
Or did you add any special class loading there?
Sven
Knut Wannheden schrieb:
> Hi Porter,
>
> Also note that you should be able to declare a single JAVA extension in
> your PostProcessor.ext and that way delegate to ATL or QVT.
>
> --knut
>
> Sebastian Zarnekow wrote:
>
>> Hi Porter,
>
>> the current post processing implementation is quite nice, because it
>> allows the editor to know about the modifications, that are performend
>> in the post processing step.
>
>> However, I'm not that familiar with ATL or QVT, but expect them to be
>> interpreted as well, so please feel free to file an enhancement
>> request. But I guess we will not prioritize it very high. It is more
>> likely that we'll fix the issues with custom data types. Again:
>> Tickets are welcome.
>
>> Regards,
>> Sebastian
>
>> Am 27.06.2009 13:30 Uhr, schrieb Porter:
>>> Eclipse has ATL and QVT/OML for M2M transformations as alternatives to
>>> Xtend.
>>>
>>> A possible future enhancement for Xtext would be to change the generator
>>> to allow plugging in ATL or QVT/OML transformations as alternatives to
>>> expecting the "<MyDsl>PostProcessor.ext" Xtend file.
>>>
>>> Choice of M2M technology for post processing would make it easier for
>>> users who already know ATL or QVT and don't want to learn Xtend and its
>>> type and expression systems just for post processing, or who prefer the
>>> alternative M2M technologies. Xtend type system also has some issues
>>> with custom EDataTypes.
>>>
>>> Any thoughts?
>>>
>>>
>>>
>
>
|
|
| | |
Re: Suggestion - custom post processing [message #53929 is a reply to message #53908] |
Mon, 29 June 2009 02:18  |
Eclipse User |
|
|
|
Hi Porter,
see below.
Am 29.06.2009 0:22 Uhr, schrieb Porter:
> What is the mechanism by which the editor is made aware of the existing
> custom post-processing then?
The editor itself has nothing to do with the post processing. It's the
underlying EMF Resource implementation (XtextResource) that does this
job. When the resource loads an Xtext grammar, it generates the Ecore
model(s) from it. Thereby the post processing is the last step. By
convention a file MyLangPostProcessor.ext should be loaded, that resides
next to the grammar resource. If it is missing, nothing would be post
processed.
However, the transformation is done inside your running Eclipse, so it
is hardly possible to load java classes from your project to do the
transformation as these classes may not yet exist or contain compile
errors etc. They are simply not available on the classpath of the
classloader in the running (Eclipse) VM.
>
> What is the extent of the awareness?
When you try to invoke ContentAssist for rule return types, you'll get
any visible EClassifier. If you create new EClasses or EDataTypes in
your post processor, these will be available for code completion, too.
> For example, if one adds items such as method bodies via an annotation,
> that are outside the scope of the meta-model inference, how are they
> treated?
Operations and method bodies are completely ignored by the grammar
editor. It is the genmodel, that processes them. EClassifiers and (not
yet but soon) EStructuralFeatures are the information, that the IDE is
aware of. See example above.
>
> Why is this part of the API Xtend-specific? I guess it's not "public" API?
It's definitely public API. We decided to use Xtend because we like the
language and it's designed for m2m transformations. We could have used
other interpreted m2m languages, but did not find a convincing use case
that justifies the effort to make the post processing hook more pluggable.
>
> Sorry for all the questions.
>
Newsgroups are a very good platform to ask questions, there is no need
to be sorry :-)
Regards,
Sebastian
|
|
|
Goto Forum:
Current Time: Tue Jul 15 23:13:24 EDT 2025
Powered by FUDForum. Page generated in 0.06122 seconds
|