| output from java program [message #525365] |
Tue, 06 April 2010 07:23  |
yeliu Messages: 145 Registered: July 2009 |
Senior Member |
|
|
Hello,
Is it possible that we direct the output location in the TestAPI.java rather than in the mofscript transformation?Thanks a lot!
M
|
|
|
|
|
|
|
| Re: output from java program [message #528108 is a reply to message #527114] |
Mon, 19 April 2010 07:37  |
Gøran K. Olsen Messages: 184 Registered: July 2009 |
Senior Member |
|
|
Hi,
it is not possible "out of the box", but there are different ways of making
something similar.
One way is to include your own parameter model as input.
This model can hold information regarding your different directories etc.
and can be populated e.g. programatically before it is passed to the
transformation.
Cheers,
G
|
|
|
| Re: output from java program [message #589876 is a reply to message #526527] |
Mon, 12 April 2010 06:19  |
yeliu Messages: 145 Registered: July 2009 |
Senior Member |
|
|
Hi,
If a transformation generate two different files, is it still available to set the output path in the java code?can you show an example how to do this?Thanks a lot!
M
|
|
|
|
| Re: output from java program [message #589894 is a reply to message #526940] |
Wed, 14 April 2010 03:18  |
yeliu Messages: 145 Registered: July 2009 |
Senior Member |
|
|
Hi,
For example, given the following transformation:
-----------------------
transformation example (in uml:"http://..."){
uml.Model::main()
{
dir="xxx"
filename="xxx"
file(dir+filename+".txt")
text to be printed
self.method(dir,filename)
}
}
uml.Model::method(dir, name)
{
file(dir+filename+".py")
code to be printed
}
}
-----------------
The outputs are one .txt file and one .py file, both located in the dir.
In such case, is it available to set the output path in the java code?
|
|
|
| Re: output from java program [message #589902 is a reply to message #527114] |
Mon, 19 April 2010 07:37  |
Gøran K. Olsen Messages: 184 Registered: July 2009 |
Senior Member |
|
|
Hi,
it is not possible "out of the box", but there are different ways of making
something similar.
One way is to include your own parameter model as input.
This model can hold information regarding your different directories etc.
and can be populated e.g. programatically before it is passed to the
transformation.
Cheers,
G
|
|
|
Powered by
FUDForum. Page generated in 0.01728 seconds