[QVTO] Set contents not remembered between init and end [message #86053] |
Mon, 07 July 2008 15:52 |
Eclipse User |
|
|
|
Originally posted by: koen.yskout.cs.kuleuven.be
Hi,
Apparently, when using a set as result, it (or at least its contents) is
not remembered between the init and end section, as shown in the sample
program attached. I suspect this is a bug?
Kind regards,
Koen
modeltype UML uses uml("http://www.eclipse.org/uml2/2.1.0/UML");
transformation demo();
main() {
map class_test();
map set_test();
}
mapping class_test() : UML::Class
{
init {
result := object Class { name := 'TestClass'; };
log('class_test_init', result)
}
end {
log('class_test_end', result);
/* got the class back, as expected */
}
}
mapping set_test() : Set(UML::Class)
{
init {
result := Set { object Class { name := 'TestClass'; }};
log('set_test_init', result);
}
end {
log('set_test_end', result);
/* got [], but expected set with one class */
}
}
|
|
|
Re: [QVTO] Set contents not remembered between init and end [message #86069 is a reply to message #86053] |
Mon, 07 July 2008 17:17 |
Sergey Boyko Messages: 171 Registered: July 2009 |
Senior Member |
|
|
Hi Koen,
Right, that's definitely a bug. I've created bugzilla CR for it:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=239831
Thank you for sample posted!
Regards,
Sergey.
Koen Yskout wrote:
> Hi,
>
> Apparently, when using a set as result, it (or at least its contents) is
> not remembered between the init and end section, as shown in the sample
> program attached. I suspect this is a bug?
>
> Kind regards,
> Koen
>
>
> modeltype UML uses uml("http://www.eclipse.org/uml2/2.1.0/UML");
> transformation demo();
> main() {
> map class_test();
> map set_test();
> }
>
> mapping class_test() : UML::Class
> {
> init {
> result := object Class { name := 'TestClass'; };
> log('class_test_init', result)
> }
> end {
> log('class_test_end', result);
> /* got the class back, as expected */
> }
> }
>
> mapping set_test() : Set(UML::Class)
> {
> init {
> result := Set { object Class { name := 'TestClass'; }};
> log('set_test_init', result);
> }
> end {
> log('set_test_end', result);
> /* got [], but expected set with one class */
> }
> }
|
|
|
Powered by
FUDForum. Page generated in 0.03659 seconds