Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] Set contents not remembered between init and end
[QVTO] Set contents not remembered between init and end [message #86053] Mon, 07 July 2008 15:52 Go to next message
Eclipse UserFriend
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 Go to previous message
Sergey Boyko is currently offline Sergey BoykoFriend
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 */
> }
> }
Previous Topic:[ATL] ATL Standalone - advanced parameters
Next Topic:[ATL] [BUG?] programmatic launch produces ATL transformation errors
Goto Forum:
  


Current Time: Thu Oct 10 11:10:43 GMT 2024

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

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

Back to the top