Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EWL] Wizard modifies underlying model([EWL] Wizard modifies underlying model)
[EWL] Wizard modifies underlying model [message #643576] Tue, 07 December 2010 09:01 Go to next message
Bak Attila is currently offline Bak Attila
Messages: 29
Registered: December 2009
Junior Member
Hi,

I have the following wizard defined on *.uml model. Everything works perfectly but this wizard modifies the underlying model. Is it ok even if there are no modification operations?
Can i prevent a wizard modifiying a model? This might sound strange but i do not want to modify the model just do some code generation for example Wink

wizard ServiceWizard {

	guard: self.isKindOf(Class) and self.getAppliedStereotype("Spring2::Service").isDefined()
	
	title: 'Service wizard: ' + self.name
	
	do {
	self.println();

	}

}


Thanks for the help.
Regards,
attila
Re: [EWL] Wizard modifies underlying model [message #643608 is a reply to message #643576] Tue, 07 December 2010 10:53 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Atilla,

Wizards don't necessarily have to modify the underlying model. To
prevent wizards from modifying the model at all, you'd need to subclass
the InMemoryEmfModel class and in particular - off the top of my head -
override the getPropertySetter(), createInstance() and deleteInstance()
methods. Hope this helps.

Cheers,
Dimitris

Bak Attila wrote:
> Hi,
>
> I have the following wizard defined on *.uml model. Everything works
> perfectly but this wizard modifies the underlying model. Is it ok even
> if there are no modification operations?
> Can i prevent a wizard modifiying a model? This might sound strange but
> i do not want to modify the model just do some code generation for
> example ;)
>
>
> wizard ServiceWizard {
>
> guard: self.isKindOf(Class) and
> self.getAppliedStereotype("Spring2::Service").isDefined()
>
> title: 'Service wizard: ' + self.name
>
> do {
> self.println();
>
> }
>
> }
>
>
> Thanks for the help.
> Regards,
> attila
Re: [EWL] Wizard modifies underlying model [message #643700 is a reply to message #643608] Tue, 07 December 2010 16:46 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen Zschaler
Messages: 228
Registered: July 2009
Senior Member
Hi Dimitris,

Just out of curiosity: Could you clarify why the example wizard given by
Atilla does actually modify the model? From its code, it would seem that
it shouldn't. Is there some Epsilon magic going on that creates some
internal modifications regardless?

Cheers,

Steffen

On 07/12/2010 15:53, Dimitris Kolovos wrote:
> Hi Atilla,
>
> Wizards don't necessarily have to modify the underlying model. To
> prevent wizards from modifying the model at all, you'd need to
> subclass the InMemoryEmfModel class and in particular - off the top of
> my head - override the getPropertySetter(), createInstance() and
> deleteInstance() methods. Hope this helps.
>
> Cheers,
> Dimitris
>
> Bak Attila wrote:
>> Hi,
>>
>> I have the following wizard defined on *.uml model. Everything works
>> perfectly but this wizard modifies the underlying model. Is it ok
>> even if there are no modification operations?
>> Can i prevent a wizard modifiying a model? This might sound strange
>> but i do not want to modify the model just do some code generation
>> for example ;)
>>
>>
>> wizard ServiceWizard {
>>
>> guard: self.isKindOf(Class) and
>> self.getAppliedStereotype("Spring2::Service").isDefined()
>> title: 'Service wizard: ' + self.name
>> do {
>> self.println();
>>
>> }
>>
>> }
>>
>>
>> Thanks for the help.
>> Regards,
>> attila
Re: [EWL] Wizard modifies underlying model [message #643763 is a reply to message #643700] Wed, 08 December 2010 03:30 Go to previous messageGo to next message
Bak Attila is currently offline Bak Attila
Messages: 29
Registered: December 2009
Junior Member
Hi Steffen,

Exactly my question. It SHOULD NOT!
That is what i do not understand!

Thanks for the help.
Attila
Re: [EWL] Wizard modifies underlying model [message #643786 is a reply to message #643763] Wed, 08 December 2010 04:43 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Steffen, Atilla,

I'm afraid I completely misunderstood the original question question. If
the wizard appears to be modifying the model - when obviously it
shouldn't - could you please file a bug report so that we can investigate?

Cheers,
Dimitris

Bak Attila wrote:
> Hi Steffen,
>
> Exactly my question. It SHOULD NOT!
> That is what i do not understand!
>
> Thanks for the help.
> Attila
Previous Topic:Trouble with cross-domain inheritance in EuGENia
Next Topic:[Eugenia] State of an editor generated by eugenia to xml
Goto Forum:
  


Current Time: Fri Aug 01 10:00:46 EDT 2014

Powered by FUDForum. Page generated in 0.02007 seconds