Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[EWL] Wizard modifies underlying model
https://www.eclipse.org/forums/index.php/mv/msg/201481/643576/#msg_643576
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]]>Bak Attila2010-12-07T14:01:22-00:00Re: [EWL] Wizard modifies underlying model
https://www.eclipse.org/forums/index.php/mv/msg/201481/643608/#msg_643608
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]]>Dimitrios Kolovos2010-12-07T15:53:49-00:00Re: [EWL] Wizard modifies underlying model
https://www.eclipse.org/forums/index.php/mv/msg/201481/643700/#msg_643700
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]]>Steffen Zschaler2010-12-07T21:46:57-00:00Re: [EWL] Wizard modifies underlying model
https://www.eclipse.org/forums/index.php/mv/msg/201481/643763/#msg_643763
Exactly my question. It SHOULD NOT!
That is what i do not understand!
Thanks for the help.
Attila]]>Bak Attila2010-12-08T08:30:00-00:00Re: [EWL] Wizard modifies underlying model
https://www.eclipse.org/forums/index.php/mv/msg/201481/643786/#msg_643786
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]]>Dimitrios Kolovos2010-12-08T09:43:08-00:00