|
|
Re: Generate model to ecore file [message #56409 is a reply to message #56243] |
Wed, 08 July 2009 20:06 |
Alexis Marechal Messages: 16 Registered: July 2009 |
Junior Member |
|
|
Hi,
We are also using TMF and ATL for M2M transformation, in our research as
well as in a masters project of one of our students. I don't think it's
weird :-P.
I just tried to use a TMF generated ecore metamodel and a file created
with the TMF editor as an instance, and I got the following error:
"Error loading platform:/resource/ProjectAToTree/ATL/projectA.pa:
org.xml.sax.SAXParseException: Content is not allowed in prolog."
Then we tried Adalbert's solution, transforming the file into xmi, and
then ATL worked without problems.
For information, this transformation is very simple if you created a
generator project: just find the .mwe workflow and replace the component
"org.eclipse.xpand2.Generator" with:
<component class="org.eclipse.emf.mwe.utils.Writer">
<uri value="./your path here/your file name here.xmi" />
<modelSlot value="model" />
</component>
Running the generator workflow should produce your xmi file.
If we can avoid the latest step it will be nice (and our masters student
will probably be relieved!).
Regards,
Alexis
Sebastian Zarnekow wrote:
> Hi Adalbert,
>
> please try to use your dsl file directly as input in your ATL
> transformation. It should work fine.
> Please let me know if you experience any problems with this approach.
>
> Regards,
> Sebastian
>
> Am 08.07.2009 10:24 Uhr, schrieb Adalbert Gorecki:
>> Hi everyone,
>>
>> I have created my own DSL and I want to transform the model written in
>> my new DSL into something else by using M2M transformation with ATL. I
>> know it sounds weird but it is part of my diploma thesis and there it
>> makes perfect sense :)
>> Is it possible to get my model as XMI/ecore file (without writing my own
>> generator) so I can use it in ATL as input for my transformation?
>> Or else, what would you recommend how I could hook up a M2M
>> transformation to Xtext?
>>
>> Best regards,
>> Adalbert
>>
>
|
|
|
Re: Generate model to ecore file [message #56436 is a reply to message #56409] |
Wed, 08 July 2009 20:24 |
Sebastian Zarnekow Messages: 3118 Registered: July 2009 |
Senior Member |
|
|
Hi Alexis,
is there a way to specify the EMF resource factories that are available
in the transformation engine? The error message indicates a missing
resource factory for the 'pa' file extension.
Regards,
Sebastian
Am 08.07.2009 22:06 Uhr, schrieb Alexis Marechal:
> Hi,
>
> We are also using TMF and ATL for M2M transformation, in our research as
> well as in a masters project of one of our students. I don't think it's
> weird :-P.
>
> I just tried to use a TMF generated ecore metamodel and a file created
> with the TMF editor as an instance, and I got the following error:
>
> "Error loading platform:/resource/ProjectAToTree/ATL/projectA.pa:
> org.xml.sax.SAXParseException: Content is not allowed in prolog."
>
> Then we tried Adalbert's solution, transforming the file into xmi, and
> then ATL worked without problems.
>
> For information, this transformation is very simple if you created a
> generator project: just find the .mwe workflow and replace the component
> "org.eclipse.xpand2.Generator" with:
>
> <component class="org.eclipse.emf.mwe.utils.Writer">
> <uri value="./your path here/your file name here.xmi" />
> <modelSlot value="model" />
> </component>
>
> Running the generator workflow should produce your xmi file.
>
> If we can avoid the latest step it will be nice (and our masters student
> will probably be relieved!).
>
> Regards,
> Alexis
>
> Sebastian Zarnekow wrote:
>> Hi Adalbert,
>>
>> please try to use your dsl file directly as input in your ATL
>> transformation. It should work fine.
>> Please let me know if you experience any problems with this approach.
>>
>> Regards,
>> Sebastian
>>
>> Am 08.07.2009 10:24 Uhr, schrieb Adalbert Gorecki:
>>> Hi everyone,
>>>
>>> I have created my own DSL and I want to transform the model written in
>>> my new DSL into something else by using M2M transformation with ATL. I
>>> know it sounds weird but it is part of my diploma thesis and there it
>>> makes perfect sense :)
>>> Is it possible to get my model as XMI/ecore file (without writing my own
>>> generator) so I can use it in ATL as input for my transformation?
>>> Or else, what would you recommend how I could hook up a M2M
>>> transformation to Xtext?
>>>
>>> Best regards,
>>> Adalbert
>>>
>>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06291 seconds