Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » Passing external variables from eclipse (External variables in QVTo)
Passing external variables from eclipse [message #1744287] Sat, 24 September 2016 01:09 Go to next message
Daniel San Martín is currently offline Daniel San MartínFriend
Messages: 21
Registered: October 2012
Junior Member
Hi,

I would like to pass some values into the qvto code from the eclipse. Until this moment, the code .qvto is hard-coded to do some comparatives. Is it possible to do that?

Thanks,

Regards,

Daniel.
Re: Passing external variables from eclipse [message #1744303 is a reply to message #1744287] Sat, 24 September 2016 15:05 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6005
Registered: July 2009
Senior Member
Hi

I'm not entirely sure what you mean by "from the eclipse" or "comparatives" but perhaps one of the two observations below may help.

You may define a configuration property in your *.qvto; e.g.

configuration property visitorInterfaceName : String;

UI: You can configure the configuration property on the Configuration tab of the launch configuration.

API: You may use org.eclipse.m2m.qvt.oml.ExecutionContextImpl.setConfigProperty()

Regards

Ed Willink
Re: Passing external variables from eclipse [message #1744311 is a reply to message #1744303] Sat, 24 September 2016 18:02 Go to previous messageGo to next message
Daniel San Martín is currently offline Daniel San MartínFriend
Messages: 21
Registered: October 2012
Junior Member
Thank you!! my apologies for the poor explanation of my problem. That is what i wanted to do!!

Thanks again.
Re: Passing external variables from eclipse [message #1744416 is a reply to message #1744303] Mon, 26 September 2016 17:02 Go to previous messageGo to next message
Daniel San Martín is currently offline Daniel San MartínFriend
Messages: 21
Registered: October 2012
Junior Member
Hello Ed,

I cannot assign values to variables, according to your explanation. I am doing something wrong or this kind of feature just work in java because you mention to include an import directive.

Here some screenshot of what I did:

Declaration of the configuration property:
index.php/fa/27212/0/

Set de value field in lauch configurations:
index.php/fa/27213/0/

Log instruction and its result:
index.php/fa/27214/0/
index.php/fa/27215/0/

Thank you.

Daniel.
Re: Passing external variables from eclipse [message #1744425 is a reply to message #1744416] Mon, 26 September 2016 19:46 Go to previous messageGo to next message
Sergey Boyko is currently offline Sergey BoykoFriend
Messages: 171
Registered: July 2009
Senior Member
Hi Daniel,

Daniel San Martín wrote on Mon, 26 September 2016 13:02
Hello Ed,

I cannot assign values to variables, according to your explanation. I am doing something wrong or this kind of feature just work in java because you mention to include an import directive.

Here some screenshot of what I did:



The screenshot with Console output clarifies that you use "QVTO Application Launch Delegate" to run the script.
This type of configuration is provided for the case when you simultaneously co-develop Java blackbox and Qvto script which makes calls to it.

For simple cases it's enough to use "Operational QVT Interpreter" to launch scripts.

I've tested both run configurations and it seems that "QVTO Application Launch Delegate" does not correctly pass initial values for configuration properties. I'll check this further.

Regards,
Sergey.

Re: Passing external variables from eclipse [message #1744427 is a reply to message #1744425] Mon, 26 September 2016 20:05 Go to previous message
Sergey Boyko is currently offline Sergey BoykoFriend
Messages: 171
Registered: July 2009
Senior Member
Sergey Boyko wrote on Mon, 26 September 2016 15:46
Hi Daniel,

I've tested both run configurations and it seems that "QVTO Application Launch Delegate" does not correctly pass initial values for configuration properties. I'll check this further.



Submitted https://bugs.eclipse.org/bugs/show_bug.cgi?id=502205
Previous Topic:Cannot add stereotypes when launching the QVTo transform programmatically from Java
Next Topic:setValue() a Stereotype with another Stereotype
Goto Forum:
  


Current Time: Tue Aug 21 17:37:27 GMT 2018

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

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

Back to the top