Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » QVT multifile structure (utils class for qvto)
QVT multifile structure [message #1016221] Tue, 05 March 2013 14:40 Go to next message
yaroslav Molodkov is currently offline yaroslav MolodkovFriend
Messages: 4
Registered: March 2013
Junior Member
Hello all,

I am new to qvt.
I have qvto(first.qvto) file that do transformation. My task is do very similar transformation(second.qvto). But a lot of function for first.qvto and second.qvto are the same. so is there way to create some utiles.qvto file that contains common function?
Re: QVT multifile structure [message #1016762 is a reply to message #1016221] Thu, 07 March 2013 15:43 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Yes there are library facilities.

Regards

Ed Willink


On 07/03/2013 01:43, yaroslav Molodkov wrote:
> Hello all,
>
> I am new to qvt. I have qvto(first.qvto) file that do transformation.
> My task is do very similar transformation(second.qvto). But a lot of
> function for first.qvto and second.qvto are the same. so is there way
> to create some utiles.qvto file that contains common function?
Re: QVT multifile structure [message #1018226 is a reply to message #1016762] Wed, 13 March 2013 12:51 Go to previous messageGo to next message
yaroslav Molodkov is currently offline yaroslav MolodkovFriend
Messages: 4
Registered: March 2013
Junior Member
Thanks Ed Willink.

> Yes there are library facilities.

But can you take maybe some link, or some hint? Because I have no idea how to do it.
Re: QVT multifile structure [message #1018308 is a reply to message #1018226] Wed, 13 March 2013 15:40 Go to previous message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
Hi Yaroslav,

Try the following:

1. Create a MyLyb.qvto file:

library MyLib;

helper doSomethingCol() : String {
return "Well, this is trivial!!";
}


2. Create a MyTransf.qvto file:

import MyLib;

transformation MyTransf();

main() {
log(doSomethingCool());
}

3. Run your MyTransf.qvto tranfs and you should see in the console:
Well, this is trivial!!

Cheers,
Adolfo.

On 13/03/2013 12:51, yaroslav Molodkov wrote:
> Thanks Ed Willink.
>
>> Yes there are library facilities.
>
> But can you take maybe some link, or some hint? Because I have no idea
> how to do it.
>
Previous Topic:[Announce] Eclipse QVT Operational 3.2.2 (Juno SR2) is now available
Next Topic:Referencing XSD Components from Java Blackbox
Goto Forum:
  


Current Time: Fri Mar 29 13:45:05 GMT 2024

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

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

Back to the top