Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] Reflectively accessing a transformation
[QVTO] Reflectively accessing a transformation [message #489641] Mon, 05 October 2009 12:54 Go to next message
Derek Palma is currently offline Derek PalmaFriend
Messages: 141
Registered: July 2009
Senior Member
Hi,

I was wondering if there is a way to load a transformation/library, i.e.
compile it and create the AST but not execute it, so I can look at the
signatures transformation, helpers, queries. I am basically trying to
achieve something analogous to Java reflection where I find the executable
operations available in a class and make them accessible from another
language and provide static type checking.

Derek
Re: [QVTO] Reflectively accessing a transformation [message #489841 is a reply to message #489641] Tue, 06 October 2009 08:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dvorak.radek.gmail.com

Hi Derek,

No API way yet. Anyway, even with this reflective access it's
not trivial to integrate QVT with another language, as for example
GMF Xpand did.
QVTO has still other issues to solve for pure transformation writers before
it can be extensible and open this way.

You have gotten to deep inside and too early ;)
Perhaps, what can be done is to open the AST model but I do not think its
helps too much.

Regards,
/Radek



On Mon, 05 Oct 2009 14:54:21 +0200, Derek Palma <derek.palma@gmail.com>
wrote:

> Hi,
>
> I was wondering if there is a way to load a transformation/library, i.e.
> compile it and create the AST but not execute it, so I can look at the
> signatures transformation, helpers, queries. I am basically trying to
> achieve something analogous to Java reflection where I find the
> executable operations available in a class and make them accessible from
> another language and provide static type checking.
>
> Derek
Re: [QVTO] Reflectively accessing a transformation [message #490167 is a reply to message #489841] Wed, 07 October 2009 15:53 Go to previous messageGo to next message
Derek Palma is currently offline Derek PalmaFriend
Messages: 141
Registered: July 2009
Senior Member
Hi,

I just ran into an Ecore model for QVT Operational
(http://www.eclipse.org/QVT/1.0.0/Operational. Are instances of this created
when transformation/libraries are parsed. It looks like something I could
use. :)

Derek

"radek dvorak" <dvorak.radek@gmail.com> wrote in message
news:op.u1dc0ow412y5f2@kliste.local...
> Hi Derek,
>
> No API way yet. Anyway, even with this reflective access it's
> not trivial to integrate QVT with another language, as for example
> GMF Xpand did.
> QVTO has still other issues to solve for pure transformation writers
> before
> it can be extensible and open this way.
>
> You have gotten to deep inside and too early ;)
> Perhaps, what can be done is to open the AST model but I do not think its
> helps too much.
>
> Regards,
> /Radek
>
>
>
> On Mon, 05 Oct 2009 14:54:21 +0200, Derek Palma <derek.palma@gmail.com>
> wrote:
>
>> Hi,
>>
>> I was wondering if there is a way to load a transformation/library, i.e.
>> compile it and create the AST but not execute it, so I can look at the
>> signatures transformation, helpers, queries. I am basically trying to
>> achieve something analogous to Java reflection where I find the
>> executable operations available in a class and make them accessible from
>> another language and provide static type checking.
>>
>> Derek
Re: [QVTO] Reflectively accessing a transformation [message #490561 is a reply to message #490167] Fri, 09 October 2009 07:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dvorak.radek.gmail.com

Hi Derek,

Yes, the meta-model represents the AST, a result of QVTO modules
parsing/analysis.
At the moment, you can't make use of it as its not open as API, the
generated Java
package is 'internal'.

In case you want to experiment, there is a resource factory registered per
*.qvto file
extension. If loaded, you will receive Transformation/Library objects
in the resource contents.

Regards,
/Radek



On Wed, 07 Oct 2009 17:53:56 +0200, Derek Palma <derek.palma@gmail.com>
wrote:

> Hi,
>
> I just ran into an Ecore model for QVT Operational
> (http://www.eclipse.org/QVT/1.0.0/Operational. Are instances of this
> created when transformation/libraries are parsed. It looks like
> something I could use. :)
>
> Derek
>
> "radek dvorak" <dvorak.radek@gmail.com> wrote in message
> news:op.u1dc0ow412y5f2@kliste.local...
>> Hi Derek,
>>
>> No API way yet. Anyway, even with this reflective access it's
>> not trivial to integrate QVT with another language, as for example
>> GMF Xpand did.
>> QVTO has still other issues to solve for pure transformation writers
>> before
>> it can be extensible and open this way.
>>
>> You have gotten to deep inside and too early ;)
>> Perhaps, what can be done is to open the AST model but I do not think
>> its
>> helps too much.
>>
>> Regards,
>> /Radek
>>
>>
>>
>> On Mon, 05 Oct 2009 14:54:21 +0200, Derek Palma <derek.palma@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I was wondering if there is a way to load a transformation/library,
>>> i.e. compile it and create the AST but not execute it, so I can look
>>> at the signatures transformation, helpers, queries. I am basically
>>> trying to achieve something analogous to Java reflection where I find
>>> the executable operations available in a class and make them
>>> accessible from another language and provide static type checking.
>>>
>>> Derek
>
Re: [QVTO] Reflectively accessing a transformation [message #490629 is a reply to message #490561] Fri, 09 October 2009 13:17 Go to previous messageGo to next message
Derek Palma is currently offline Derek PalmaFriend
Messages: 141
Registered: July 2009
Senior Member
Thanks,

Do you happen to know the fully qualified class name of the Resource
implementation? I currently invoke all resource loading through my own code.

Derek

"radek dvorak" <dvorak.radek@gmail.com> wrote in message
news:op.u1iv8lbp12y5f2@kliste.local...
> Hi Derek,
>
> Yes, the meta-model represents the AST, a result of QVTO modules
> parsing/analysis.
> At the moment, you can't make use of it as its not open as API, the
> generated Java
> package is 'internal'.
>
> In case you want to experiment, there is a resource factory registered per
> *.qvto file
> extension. If loaded, you will receive Transformation/Library objects
> in the resource contents.
>
> Regards,
> /Radek
>
>
>
> On Wed, 07 Oct 2009 17:53:56 +0200, Derek Palma <derek.palma@gmail.com>
> wrote:
>
>> Hi,
>>
>> I just ran into an Ecore model for QVT Operational
>> (http://www.eclipse.org/QVT/1.0.0/Operational. Are instances of this
>> created when transformation/libraries are parsed. It looks like
>> something I could use. :)
>>
>> Derek
>>
>> "radek dvorak" <dvorak.radek@gmail.com> wrote in message
>> news:op.u1dc0ow412y5f2@kliste.local...
>>> Hi Derek,
>>>
>>> No API way yet. Anyway, even with this reflective access it's
>>> not trivial to integrate QVT with another language, as for example
>>> GMF Xpand did.
>>> QVTO has still other issues to solve for pure transformation writers
>>> before
>>> it can be extensible and open this way.
>>>
>>> You have gotten to deep inside and too early ;)
>>> Perhaps, what can be done is to open the AST model but I do not think
>>> its
>>> helps too much.
>>>
>>> Regards,
>>> /Radek
>>>
>>>
>>>
>>> On Mon, 05 Oct 2009 14:54:21 +0200, Derek Palma <derek.palma@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I was wondering if there is a way to load a transformation/library,
>>>> i.e. compile it and create the AST but not execute it, so I can look
>>>> at the signatures transformation, helpers, queries. I am basically
>>>> trying to achieve something analogous to Java reflection where I find
>>>> the executable operations available in a class and make them
>>>> accessible from another language and provide static type checking.
>>>>
>>>> Derek
>>
Re: [QVTO] Reflectively accessing a transformation [message #490737 is a reply to message #490561] Fri, 09 October 2009 22:26 Go to previous messageGo to next message
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 51
Registered: August 2009
Member
Eclipse User wrote on Fri, 09 October 2009 03:54
Originally posted by: dvorak.radek.gmail.com

In case you want to experiment, there is a resource factory registered per *.qvto file extension. If loaded, you will receive Transformation/Library objects in the resource contents.

... which is also why .qvto files can be opened in any reflective model editor, such as Sample Ecore Model editor, MoDisco ModelEditor etc. (Right-click, Open With, Other ...) The best way to explore the QVT model, IMO ...

Alex

[Updated on: Fri, 09 October 2009 22:27]

Report message to a moderator

Re: [QVTO] Reflectively accessing a transformation [message #490786 is a reply to message #490629] Sat, 10 October 2009 16:34 Go to previous messageGo to next message
Derek Palma is currently offline Derek PalmaFriend
Messages: 141
Registered: July 2009
Senior Member
I found it.


"Derek Palma" <derek.palma@gmail.com> wrote in message
news:hand68$ir7$1@build.eclipse.org...
> Thanks,
>
> Do you happen to know the fully qualified class name of the Resource
> implementation? I currently invoke all resource loading through my own
> code.
>
> Derek
>
> "radek dvorak" <dvorak.radek@gmail.com> wrote in message
> news:op.u1iv8lbp12y5f2@kliste.local...
>> Hi Derek,
>>
>> Yes, the meta-model represents the AST, a result of QVTO modules
>> parsing/analysis.
>> At the moment, you can't make use of it as its not open as API, the
>> generated Java
>> package is 'internal'.
>>
>> In case you want to experiment, there is a resource factory registered
>> per *.qvto file
>> extension. If loaded, you will receive Transformation/Library objects
>> in the resource contents.
>>
>> Regards,
>> /Radek
>>
>>
>>
>> On Wed, 07 Oct 2009 17:53:56 +0200, Derek Palma <derek.palma@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I just ran into an Ecore model for QVT Operational
>>> (http://www.eclipse.org/QVT/1.0.0/Operational. Are instances of this
>>> created when transformation/libraries are parsed. It looks like
>>> something I could use. :)
>>>
>>> Derek
>>>
>>> "radek dvorak" <dvorak.radek@gmail.com> wrote in message
>>> news:op.u1dc0ow412y5f2@kliste.local...
>>>> Hi Derek,
>>>>
>>>> No API way yet. Anyway, even with this reflective access it's
>>>> not trivial to integrate QVT with another language, as for example
>>>> GMF Xpand did.
>>>> QVTO has still other issues to solve for pure transformation writers
>>>> before
>>>> it can be extensible and open this way.
>>>>
>>>> You have gotten to deep inside and too early ;)
>>>> Perhaps, what can be done is to open the AST model but I do not think
>>>> its
>>>> helps too much.
>>>>
>>>> Regards,
>>>> /Radek
>>>>
>>>>
>>>>
>>>> On Mon, 05 Oct 2009 14:54:21 +0200, Derek Palma <derek.palma@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I was wondering if there is a way to load a transformation/library,
>>>>> i.e. compile it and create the AST but not execute it, so I can look
>>>>> at the signatures transformation, helpers, queries. I am basically
>>>>> trying to achieve something analogous to Java reflection where I find
>>>>> the executable operations available in a class and make them
>>>>> accessible from another language and provide static type checking.
>>>>>
>>>>> Derek
>>>
>
Re: [QVTO] Reflectively accessing a transformation [message #490845 is a reply to message #490629] Sun, 11 October 2009 19:37 Go to previous message
Eclipse UserFriend
Originally posted by: dvorak.radek.gmail.com

Hi Derek,

There is no need to access the resource implementation class, EMF ensures
that the right
implementation is used with qvto file name extension.

Regards,
/Radek


On Fri, 09 Oct 2009 15:17:32 +0200, Derek Palma <derek.palma@gmail.com>
wrote:

> Thanks,
>
> Do you happen to know the fully qualified class name of the Resource
> implementation? I currently invoke all resource loading through my own
> code.
>
> Derek
>
> "radek dvorak" <dvorak.radek@gmail.com> wrote in message
> news:op.u1iv8lbp12y5f2@kliste.local...
>> Hi Derek,
>>
>> Yes, the meta-model represents the AST, a result of QVTO modules
>> parsing/analysis.
>> At the moment, you can't make use of it as its not open as API, the
>> generated Java
>> package is 'internal'.
>>
>> In case you want to experiment, there is a resource factory registered
>> per *.qvto file
>> extension. If loaded, you will receive Transformation/Library objects
>> in the resource contents.
>>
>> Regards,
>> /Radek
>>
>>
>>
>> On Wed, 07 Oct 2009 17:53:56 +0200, Derek Palma <derek.palma@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I just ran into an Ecore model for QVT Operational
>>> (http://www.eclipse.org/QVT/1.0.0/Operational. Are instances of this
>>> created when transformation/libraries are parsed. It looks like
>>> something I could use. :)
>>>
>>> Derek
>>>
>>> "radek dvorak" <dvorak.radek@gmail.com> wrote in message
>>> news:op.u1dc0ow412y5f2@kliste.local...
>>>> Hi Derek,
>>>>
>>>> No API way yet. Anyway, even with this reflective access it's
>>>> not trivial to integrate QVT with another language, as for example
>>>> GMF Xpand did.
>>>> QVTO has still other issues to solve for pure transformation writers
>>>> before
>>>> it can be extensible and open this way.
>>>>
>>>> You have gotten to deep inside and too early ;)
>>>> Perhaps, what can be done is to open the AST model but I do not think
>>>> its
>>>> helps too much.
>>>>
>>>> Regards,
>>>> /Radek
>>>>
>>>>
>>>>
>>>> On Mon, 05 Oct 2009 14:54:21 +0200, Derek Palma
>>>> <derek.palma@gmail.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I was wondering if there is a way to load a transformation/library,
>>>>> i.e. compile it and create the AST but not execute it, so I can look
>>>>> at the signatures transformation, helpers, queries. I am basically
>>>>> trying to achieve something analogous to Java reflection where I
>>>>> find the executable operations available in a class and make them
>>>>> accessible from another language and provide static type checking.
>>>>>
>>>>> Derek
>>>
>
Previous Topic:[QVTO] resolve issue with nested mappings
Next Topic:[QVTO] How to call different mappings based on some predicate?
Goto Forum:
  


Current Time: Thu Apr 25 11:33:20 GMT 2024

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

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

Back to the top