Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » storing model from ant script
storing model from ant script [message #516603] Wed, 24 February 2010 14:34 Go to next message
m kranz is currently offline m kranzFriend
Messages: 69
Registered: January 2010
Member
hi dimitris

now that i am able to load a model from ant, i was trying to modify them, but my changes didn't show up in the model. guess i have to
store the model to make the changes visible?

i tried the following:

<project default="main">
	<target name="main">
		<epsilon.emf.loadModel
			name = "Ecore_new"
			modelfile="model/testing.ecore"
			metamodeluri="http://www.eclipse.org/emf/2002/Ecore"
			read="true"
			store="false"/>
		<epsilon.emf.loadModel
			name = "Ecore_old"
			modelfile="model/testing_old.ecore"
			metamodeluri="http://www.eclipse.org/emf/2002/Ecore"
			read="true"
			store="false"/>
		<epsilon.eol src="model/moveGMFAnnotations.eol">
			<model ref="Ecore_new"/>
			<model ref="Ecore_old"/>
		</epsilon.eol>
		<epsilon.storeModel
			name = "Ecore_new"
			/>
	</target>
</project>



but it got an error stating that "epsilon.storeModel doesn't support the 'name' attribute".
in the book (p. 162) it says 'name' and 'target' are supported, so i guess there's something else i'm doing wrong here?
thanks in advance

marco

[Updated on: Wed, 24 February 2010 14:35]

Report message to a moderator

Re: storing model from ant script [message #516622 is a reply to message #516603] Wed, 24 February 2010 15:30 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Marco,

This is a mistake in the book. Sorry about that. It's
<epsilon.storeModel model="Ecore_new">.

I assume that you want to copy testing_old.ecore to testing.ecore using
EOL. In this case, you don't even need epsilon.storeModel. Instead, you
can specify your loadModel tasks like this:

<epsilon.emf.loadModel
name = "Ecore_new"
modelfile="model/testing.ecore"
metamodeluri="http://www.eclipse.org/emf/2002/Ecore"
read="false" <-- You don't need this to exist or preserve
its contents
store="true"/> <-- You need this to be saved when the
workflow is over successfully
<epsilon.emf.loadModel
name = "Ecore_old"
modelfile="model/testing_old.ecore"
metamodeluri="http://www.eclipse.org/emf/2002/Ecore"
read="true"
store="false"/>

Cheers,
Dimitris

Marco.Kranz@fokus.fraunhofer.de wrote:
> hi dimitris
>
> now that i am able to load model from ant, i was trying to modify them,
> but my changes didn't show up in the model. guess i have to store the
> model to make the changes visible?
>
> i tried the following:
>
> <project default="main">
> <target name="main">
> <epsilon.emf.loadModel
> name = "Ecore_new"
> modelfile="model/testing.ecore"
> metamodeluri="http://www.eclipse.org/emf/2002/Ecore"
> read="true"
> store="false"/>
> <epsilon.emf.loadModel
> name = "Ecore_old"
> modelfile="model/testing_old.ecore"
> metamodeluri="http://www.eclipse.org/emf/2002/Ecore"
> read="true"
> store="false"/>
> <epsilon.eol src="model/moveGMFAnnotations.eol">
> <model ref="Ecore_new"/>
> <model ref="Ecore_old"/>
> </epsilon.eol>
> <epsilon.storeModel
> name = "Ecore_new"
> />
> </target>
> </project>
>
>
>
> but it got an error stating that "epsilon.storeModel doesn't support the
> 'name' attribute".
> in the book (p. 162) it says 'name' and 'target' are supported, so i
> guess there's something else i'm doing wrong here?
> thanks in advance
>
> marco
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: storing model from ant script [message #516661 is a reply to message #516622] Wed, 24 February 2010 17:17 Go to previous messageGo to next message
m kranz is currently offline m kranzFriend
Messages: 69
Registered: January 2010
Member
thanks dimitris, it works. Smile

i'm working on a script to copy the eugenia annotations from an old model version to a new one, since our .ecore files are generated.
so for every change we have to reapply all annotations...
just out of curiousity, there isn't something like this out there already?
Re: storing model from ant script [message #516681 is a reply to message #516661] Wed, 24 February 2010 18:05 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Marco,

Not that I'm aware of, but it would be a welcome contribution!

Cheers,
Dimitris

Marco.Kranz@fokus.fraunhofer.de wrote:
> thanks dimitris, it works. :)
> i'm working on a script to copy the eugenia annotations from an old
> model version to a new one, since our .ecore files are generated. so for
> every change we have to reapply all annotations...
> just out of curiousity, there isn't something like this out there already?
Re: storing model from ant script [message #517924 is a reply to message #516681] Tue, 02 March 2010 14:37 Go to previous messageGo to next message
m kranz is currently offline m kranzFriend
Messages: 69
Registered: January 2010
Member
i'll send you the result if you're interested. nothing special, but it gets the job done.

Dimitrios Kolovos wrote on Wed, 24 February 2010 13:05
Hi Marco,

Not that I'm aware of, but it would be a welcome contribution!

Cheers,
Dimitris

Marco.Kranz@fokus.fraunhofer.de wrote:
> thanks dimitris, it works. Smile
> i'm working on a script to copy the eugenia annotations from an old
> model version to a new one, since our .ecore files are generated. so for
> every change we have to reapply all annotations...
> just out of curiousity, there isn't something like this out there already?

Re: storing model from ant script [message #518081 is a reply to message #517924] Tue, 02 March 2010 23:17 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Marco,

Thanks! Could you please open a bugzilla, attach the script there
(preferably with a sample model to go with it) and post the link here?

Cheers,
Dimitris

Marco.Kranz@fokus.fraunhofer.de wrote:
> i'll send you the result if you're interested. nothing special, but it
> gets the job done.
>
> Dimitrios Kolovos wrote on Wed, 24 February 2010 13:05
>> Hi Marco,
>>
>> Not that I'm aware of, but it would be a welcome contribution!
>>
>> Cheers,
>> Dimitris
>>
>> Marco.Kranz@fokus.fraunhofer.de wrote:
>> > thanks dimitris, it works. :)
>> > i'm working on a script to copy the eugenia annotations from an old
>> > model version to a new one, since our .ecore files are generated. so
>> for > every change we have to reapply all annotations...
>> > just out of curiousity, there isn't something like this out there
>> already?
>
>
Re: storing model from ant script [message #519295 is a reply to message #518081] Mon, 08 March 2010 12:41 Go to previous messageGo to next message
m kranz is currently offline m kranzFriend
Messages: 69
Registered: January 2010
Member
hi dimitris

link:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=304977

cheers

marco
Re: storing model from ant script [message #519354 is a reply to message #519295] Mon, 08 March 2010 15:04 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Thanks Marco!

Cheers,
Dimitris

Marco.Kranz@fokus.fraunhofer.de wrote:
> hi dimitris
>
> link:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=304977
>
> cheers
>
> marco


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: storing model from ant script [message #586702 is a reply to message #516603] Wed, 24 February 2010 15:30 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Marco,

This is a mistake in the book. Sorry about that. It's
<epsilon.storeModel model="Ecore_new">.

I assume that you want to copy testing_old.ecore to testing.ecore using
EOL. In this case, you don't even need epsilon.storeModel. Instead, you
can specify your loadModel tasks like this:

<epsilon.emf.loadModel
name = "Ecore_new"
modelfile="model/testing.ecore"
metamodeluri="http://www.eclipse.org/emf/2002/Ecore"
read="false" <-- You don't need this to exist or preserve
its contents
store="true"/> <-- You need this to be saved when the
workflow is over successfully
<epsilon.emf.loadModel
name = "Ecore_old"
modelfile="model/testing_old.ecore"
metamodeluri="http://www.eclipse.org/emf/2002/Ecore"
read="true"
store="false"/>

Cheers,
Dimitris

Marco.Kranz@fokus.fraunhofer.de wrote:
> hi dimitris
>
> now that i am able to load model from ant, i was trying to modify them,
> but my changes didn't show up in the model. guess i have to store the
> model to make the changes visible?
>
> i tried the following:
>
> <project default="main">
> <target name="main">
> <epsilon.emf.loadModel
> name = "Ecore_new"
> modelfile="model/testing.ecore"
> metamodeluri="http://www.eclipse.org/emf/2002/Ecore"
> read="true"
> store="false"/>
> <epsilon.emf.loadModel
> name = "Ecore_old"
> modelfile="model/testing_old.ecore"
> metamodeluri="http://www.eclipse.org/emf/2002/Ecore"
> read="true"
> store="false"/>
> <epsilon.eol src="model/moveGMFAnnotations.eol">
> <model ref="Ecore_new"/>
> <model ref="Ecore_old"/>
> </epsilon.eol>
> <epsilon.storeModel
> name = "Ecore_new"
> />
> </target>
> </project>
>
>
>
> but it got an error stating that "epsilon.storeModel doesn't support the
> 'name' attribute".
> in the book (p. 162) it says 'name' and 'target' are supported, so i
> guess there's something else i'm doing wrong here?
> thanks in advance
>
> marco
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: storing model from ant script [message #586723 is a reply to message #516622] Wed, 24 February 2010 17:17 Go to previous message
m kranz is currently offline m kranzFriend
Messages: 69
Registered: January 2010
Member
thanks dimitris, it works. :)

i'm working on a script to copy the eugenia annotations from an old model version to a new one, since our .ecore files are generated.
so for every change we have to reapply all annotations...
just out of curiousity, there isn't something like this out there already?
Re: storing model from ant script [message #586734 is a reply to message #516661] Wed, 24 February 2010 18:05 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Marco,

Not that I'm aware of, but it would be a welcome contribution!

Cheers,
Dimitris

Marco.Kranz@fokus.fraunhofer.de wrote:
> thanks dimitris, it works. :)
> i'm working on a script to copy the eugenia annotations from an old
> model version to a new one, since our .ecore files are generated. so for
> every change we have to reapply all annotations...
> just out of curiousity, there isn't something like this out there already?
Re: storing model from ant script [message #586943 is a reply to message #516681] Tue, 02 March 2010 14:37 Go to previous message
m kranz is currently offline m kranzFriend
Messages: 69
Registered: January 2010
Member
i'll send you the result if you're interested. nothing special, but it gets the job done.

Dimitrios Kolovos wrote on Wed, 24 February 2010 13:05
> Hi Marco,
>
> Not that I'm aware of, but it would be a welcome contribution!
>
> Cheers,
> Dimitris
>
> Marco.Kranz@fokus.fraunhofer.de wrote:
> > thanks dimitris, it works. :)
> > i'm working on a script to copy the eugenia annotations from an old
> > model version to a new one, since our .ecore files are generated. so for
> > every change we have to reapply all annotations...
> > just out of curiousity, there isn't something like this out there already?
Re: storing model from ant script [message #586950 is a reply to message #586943] Tue, 02 March 2010 23:17 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Marco,

Thanks! Could you please open a bugzilla, attach the script there
(preferably with a sample model to go with it) and post the link here?

Cheers,
Dimitris

Marco.Kranz@fokus.fraunhofer.de wrote:
> i'll send you the result if you're interested. nothing special, but it
> gets the job done.
>
> Dimitrios Kolovos wrote on Wed, 24 February 2010 13:05
>> Hi Marco,
>>
>> Not that I'm aware of, but it would be a welcome contribution!
>>
>> Cheers,
>> Dimitris
>>
>> Marco.Kranz@fokus.fraunhofer.de wrote:
>> > thanks dimitris, it works. :)
>> > i'm working on a script to copy the eugenia annotations from an old
>> > model version to a new one, since our .ecore files are generated. so
>> for > every change we have to reapply all annotations...
>> > just out of curiousity, there isn't something like this out there
>> already?
>
>
Re: storing model from ant script [message #587180 is a reply to message #518081] Mon, 08 March 2010 12:41 Go to previous message
m kranz is currently offline m kranzFriend
Messages: 69
Registered: January 2010
Member
hi dimitris

link:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=304977

cheers

marco
Re: storing model from ant script [message #587209 is a reply to message #519295] Mon, 08 March 2010 15:04 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Thanks Marco!

Cheers,
Dimitris

Marco.Kranz@fokus.fraunhofer.de wrote:
> hi dimitris
>
> link:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=304977
>
> cheers
>
> marco


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Previous Topic:[EuGENia] Reorder nodes in ECore2GMF.eol
Next Topic:EVL is not working.
Goto Forum:
  


Current Time: Tue Apr 23 08:03:43 GMT 2024

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

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

Back to the top