output from java program [message #525365] |
Tue, 06 April 2010 11:23  |
Eclipse User |
|
|
|
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 #527114 is a reply to message #526940] |
Wed, 14 April 2010 07:18   |
Eclipse User |
|
|
|
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 #528108 is a reply to message #527114] |
Mon, 19 April 2010 11:37  |
Eclipse User |
|
|
|
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 #589894 is a reply to message #526940] |
Wed, 14 April 2010 07:18  |
Eclipse User |
|
|
|
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 11:37  |
Eclipse User |
|
|
|
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.03551 seconds