Skip to main content



      Home
Home » Modeling » QVT-OML » Passing external variables from eclipse (External variables in QVTo)
Passing external variables from eclipse [message #1744287] Fri, 23 September 2016 21:09 Go to next message
Eclipse UserFriend
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 11:05 Go to previous messageGo to next message
Eclipse UserFriend
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 14:02 Go to previous messageGo to next message
Eclipse UserFriend
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 13:02 Go to previous messageGo to next message
Eclipse UserFriend
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 15:46 Go to previous messageGo to next message
Eclipse UserFriend
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 16:05 Go to previous message
Eclipse UserFriend
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 Jul 15 09:30:19 EDT 2025

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

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

Back to the top