Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MOFScript » output from java program
output from java program [message #525365] Tue, 06 April 2010 11:23 Go to next message
yeliu is currently offline yeliuFriend
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 #526527 is a reply to message #525365] Mon, 12 April 2010 07:46 Go to previous messageGo to next message
Gøran K. Olsen is currently offline Gøran K. OlsenFriend
Messages: 184
Registered: July 2009
Senior Member
Not sure what you mean by this, but it is possible to set the output
directory programatically in java and also on the file properties.

/G
Re: output from java program [message #526569 is a reply to message #526527] Mon, 12 April 2010 10:19 Go to previous messageGo to next message
yeliu is currently offline yeliuFriend
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 #526940 is a reply to message #526569] Tue, 13 April 2010 14:31 Go to previous messageGo to next message
Gøran K. Olsen is currently offline Gøran K. OlsenFriend
Messages: 184
Registered: July 2009
Senior Member
Can you explain the scenario you want to run?

Cheers,
G
Re: output from java program [message #527114 is a reply to message #526940] Wed, 14 April 2010 07:18 Go to previous messageGo to next message
yeliu is currently offline yeliuFriend
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 #528108 is a reply to message #527114] Mon, 19 April 2010 11:37 Go to previous message
Gøran K. Olsen is currently offline Gøran K. OlsenFriend
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 10:19 Go to previous message
yeliu is currently offline yeliuFriend
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 #589885 is a reply to message #526569] Tue, 13 April 2010 14:31 Go to previous message
Gøran K. Olsen is currently offline Gøran K. OlsenFriend
Messages: 184
Registered: July 2009
Senior Member
Can you explain the scenario you want to run?

Cheers,
G
Re: output from java program [message #589894 is a reply to message #526940] Wed, 14 April 2010 07:18 Go to previous message
yeliu is currently offline yeliuFriend
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 11:37 Go to previous message
Gøran K. Olsen is currently offline Gøran K. OlsenFriend
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
Previous Topic:output from java program
Next Topic:MOFScript installation on Ganymede
Goto Forum:
  


Current Time: Sat Dec 20 14:28:19 GMT 2014

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

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