Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » Higher-order model transformations with QVTo
Higher-order model transformations with QVTo [message #875306] Tue, 22 May 2012 13:52 Go to next message
Maarten van Dongen is currently offline Maarten van DongenFriend
Messages: 3
Registered: May 2012
Junior Member
Hi,

Does anyone know if it is possible to create a transformation which has a qvto-file as input and a qvto-file as output? I found this www.eclipse.org/forums/index.php/m/555659/ , but the transformation which is mentioned there only works if the output file is a xmi-file.

I know that in ATL it is possible to create higher-order transformations, is something like that also possible in QVTo?

Kind regards,
Maarten
Re: Higher-order model transformations with QVTo [message #875332 is a reply to message #875306] Tue, 22 May 2012 14:38 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
Registered: July 2009
Senior Member
HI

Should be no problem. If *.xmi is a problem then you have got your
content type registrations wrong.

Regards

Ed Willink


On 22/05/2012 14:52, Maarten van Dongen wrote:
> Hi,
>
> Does anyone know if it is possible to create a transformation which
> has a qvto-file as input and a qvto-file as output? I found this
> www.eclipse.org/forums/index.php/m/555659/ , but the transformation
> which is mentioned there only works if the output file is a xmi-file.
>
> I know that in ATL it is possible to create higher-order
> transformations, is something like that also possible in QVTo?
>
> Kind regards,
> Maarten
Re: Higher-order model transformations with QVTo [message #875701 is a reply to message #875332] Wed, 23 May 2012 07:49 Go to previous messageGo to next message
Maarten van Dongen is currently offline Maarten van DongenFriend
Messages: 3
Registered: May 2012
Junior Member
Thanks for your reply. But what do you mean by 'content type registrations'? And how can I change it? Because if I specify the output file as *.qvto I don't get any output at all.

Regards,
Maarten
Re: Higher-order model transformations with QVTo [message #875727 is a reply to message #875701] Wed, 23 May 2012 08:38 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
Registered: July 2009
Senior Member
Hi

You need to look at it from the tool's point of view. How can it know
what kind of Resource you want?

The easier traditional way is by 'file' extensions. From UML's plugin.xml.

<extension point="org.eclipse.emf.ecore.extension_parser">
<parser
type="uml"

class="org.eclipse.uml2.uml.internal.resource.UMLResourceFactoryImpl" />
</extension>

The more powerful way, typically for XML files, is to peek at the
content and decide accordingly, typically from some namespace URI. Again
from UML's plugin.xml, the first of many registrations:

<extension
point="org.eclipse.emf.ecore.content_parser">
<parser
contentTypeIdentifier="org.eclipse.uml2.uml"

class="org.eclipse.uml2.uml.internal.resource.UMLResourceFactoryImpl" />
</extension>

<extension
point="org.eclipse.core.contenttype.contentTypes">
<content-type
base-type="org.eclipse.emf.ecore.xmi"
file-extensions="uml2"
id="org.eclipse.uml2"
name="%_UI_UML2_content_type"
priority="normal">
<describer

class="org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Describer">
<parameter
name="namespace"
value="http://www.eclipse.org/uml2/1.0.0/UML" />
<parameter
name="kind"
value="xmi" />
</describer>
</content-type>
......

When running standalone there is a corresponding Java API. Prior to
Juno, getting the above correct was hard. Juno introduces a
UMLResourcesUtil.init() that is worth reviewing to see everything that
might be appropriate.

Regards

Ed Willink
On 23/05/2012 08:49, Maarten van Dongen wrote:
> Thanks for your reply. But what do you mean by 'content type
> registrations'? And how can I change it? Because if I specify the
> output file as *.qvto I don't get any output at all.
>
> Regards,
> Maarten
Re: Higher-order model transformations with QVTo [message #878076 is a reply to message #875727] Mon, 28 May 2012 13:25 Go to previous messageGo to next message
Maarten van Dongen is currently offline Maarten van DongenFriend
Messages: 3
Registered: May 2012
Junior Member
Hi Edward,

I created a plugin project in eclipse and added the following extention point:

<plugin>
<extension point="org.eclipse.emf.ecore.extension_parser">
<parser type="qvto" class="org.eclipse.m2m.internal.qvt.oml.runtime.resource.QvtOperationalResourceFactoryImpl" />
</extension>
</plugin>

Then I started a new instance of Eclipse based on the plugin project. But I still could not transform a qvto-file into another qvto-file. Maybe I didn't understand your reply, I don't have a lot of experience with QVTo.

How and where should I define this extension point? Or do you maybe know some tutorials or example where they explain how to create a higher-order transformation for QVTo?

Kind regards,
Maarten
Re: Higher-order model transformations with QVTo [message #878110 is a reply to message #878076] Mon, 28 May 2012 15:11 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
Registered: July 2009
Senior Member
Hi Maarten

Sorry; I've been slow to grasp the problem.

For QVTo there are three representations

*.qvto - a textual represention conforming to the OMG specification
*.qvtoperational - a 'proprietary' Concrete Syntax model representation
influenced by the OMG specification
*.qvtox - a 'proprietary' Abstract Syntax model representation
influenced by the OMG specification

There is also

*.eqvtoperational - an Abstract Syntax model representation conforming
to the OMG specification in so far as an Ecore-based model can conform.
*.qvtoperational - an Abstract Syntax model representation conforming as
closely as possible to the OMG specification using an EMOF-basis.

As far as I am aware the planned migration from Borland's pragmatic
*.qvtox to *.eqvtoperational never happened. So the *.qvt.oml.ecore.*
and *.qvt.oml.emof.* plugins are just red herrings to confuse anyone
studying the code.

Any one doing model to model transformations should be using the
Abstract Syntax models, so with QVTo today you need to do *.qvtox to
*.qvtox using the models defined in the org.eclipse.m2m.qvt.oml plugin
where you will find

<extension point="org.eclipse.emf.ecore.extension_parser">
<parser type="qvtox"
class="org.eclipse.m2m.internal.qvt.oml.compiler.ExeXMIResource$Factory"/>
</extension>

You should not be defining extension_parser's yourself.

For transformation all you really need is
/org.eclipse.m2m.qvt.oml/model/QVTOperational.ecore to define the
Abstract Syntax meta-model.

If you want to use textual input or output then you need a parser from
*.qvto to *.qvtox. Unfortunately this is only available internally; that
is there is certainly no UI capability and perhaps a trivial missing
Java API to support this. A patch to provide this capability is
currently in the pipeline. You might care to contact nicolas.f.rouquette
_at_ jpl.nasa.gov for an early copy.

For *.qvtox to *.qvto you need an unparser/pretty printer. I don't know
if there is one, but I would be slightly surprised if there isn't.

So for Model to Model transformation it's fairly easy; just use *.qvtox
files and accept Borland's pragmatic interpretation of OMG' QVTo AST
specification.

The surrounding Text to Model and Model to Text may be harder.

Regards

Ed Willink

On 28/05/2012 14:25, Maarten van Dongen wrote:
> Hi Edward,
>
> I created a plugin project in eclipse and added the following
> extention point:
>
> <plugin>
> <extension point="org.eclipse.emf.ecore.extension_parser">
> <parser type="qvto"
> class="org.eclipse.m2m.internal.qvt.oml.runtime.resource.QvtOperationalResourceFactoryImpl"
> />
> </extension>
> </plugin>
>
> Then I started a new instance of Eclipse based on the plugin project.
> But I still could not transform a qvto-file into another qvto-file.
> Maybe I didn't understand your reply, I don't have a lot of experience
> with QVTo.
>
> How and where should I define this extension point? Or do you maybe
> know some tutorials or example where they explain how to create a
> higher-order transformation for QVTo?
>
> Kind regards,
> Maarten
Re: Higher-order model transformations with QVTo [message #878531 is a reply to message #875306] Tue, 29 May 2012 13:41 Go to previous messageGo to next message
Uwe Ritzmann is currently offline Uwe RitzmannFriend
Messages: 24
Registered: July 2009
Junior Member
Hi Maarten,

AFAIK, qvto files can serve as input but can not be produced as output unfortunately.

See: www.eclipse.org/forums/index.php/t/201738/
or bugs.eclipse.org/bugs/show_bug.cgi?id=377320

Best Regards

Uwe
Re: Higher-order model transformations with QVTo [message #987810 is a reply to message #875306] Wed, 28 November 2012 09:13 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
did something happen in this concerns? The bug report 377320 reported by
Uwe Ritzman has nobody assigned. I'm very interested in doing
higher-order transformations with a QVTO transformation as output, as well.

best regards,
Gilbert
Re: Higher-order model transformations with QVTo [message #988318 is a reply to message #987810] Thu, 29 November 2012 11:45 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
Registered: July 2009
Senior Member
Hi

Comment added on the bug.

Bugs only really need assigning when there is a large pool of committers
fighting for the opportunity to fix a bug; sadly not the case with QVTo.

Regards

Ed Willink


On 28/11/2012 09:13, Gilbert Mirenque wrote:
> Hi,
> did something happen in this concerns? The bug report 377320 reported by
> Uwe Ritzman has nobody assigned. I'm very interested in doing
> higher-order transformations with a QVTO transformation as output, as well.
>
> best regards,
> Gilbert
Previous Topic:QVT-o and Aspect-oriented style...
Next Topic:Passing a profile instance to a QVTo transform
Goto Forum:
  


Current Time: Sat Dec 20 18:03:53 GMT 2014

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

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