Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Good way to get operations object from MessageOccurenceSpecification
[Acceleo] Good way to get operations object from MessageOccurenceSpecification [message #532628] Mon, 10 May 2010 15:41 Go to next message
Laviale Benoit is currently offline Laviale BenoitFriend
Messages: 25
Registered: April 2010
Location: Paris
Junior Member
Hello everybody,

What's the différrent ways to get opérations object from a message object?

For the moment, i do 3 Whiles to get the operation from an object with this code :

[for (mess : MessageOccurrenceSpecification | i.fragment) ]			
			[for (l : Lifeline | mess.covered)]	
				[for ( o  : Operation | l.represents.type.ownedElement ) ? (mess.message.name = o.name and mess.event.eClass().name = 'ReceiveOperationEvent')]
		self.[o.name/]()
				[/for]
			[/for]
		[/for]

But i think its not the best way to do.

I want to have "directly" the Operation object, with out "whiles" in the "main while"

What's the différence between Messages ( object in the MessageOccurrenceSpecification object ) and MessageOccurrenceSpecification?
Because I don't know what's the "Job" of MessageOccurenceSpecification...

Thank you for your help!

Benoit


Trainee
Thales Communications France

[Updated on: Mon, 10 May 2010 15:43]

Report message to a moderator

Re: [Acceleo] Good way to get operations object from MessageOccurenceSpecification [message #533092 is a reply to message #532628] Wed, 12 May 2010 08:31 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040108020407030804030704
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Benoit,

Can't really help you there, as I am not that familiar with the UML
metamodel myself. This is really an UML question that would be better
asked on the UML newsgroup.

Laurent Goubet
Obeo

Laviale Benoit wrote:
> Hello everybody,
>
> What's the différrent ways to get opérations object from a message object?
> To get the message i have something like that :
>
> [for mess : MessageOcurrenceSpécification | interaction.fragment]
> [mess.message.name/]
> [/for]
>
> For the moment, i do 3 Whiles to get the operation from an object with
> this code :
>
>
> [for (mess : MessageOccurrenceSpecification | i.fragment) ]
> [for (l : Lifeline | mess.covered)]
> [for ( o : Operation | l.represents.type.ownedElement )
> ? (mess.message.name = o.name and mess.event.eClass().name =
> 'ReceiveOperationEvent')]
> self.[o.name/]()
> [/for]
> [/for]
> [/for]
>
> But i think its not the best way to do.
>
> I want to have "directly" the Operation object, with out "whiles" in
> the "main while"
>
> What's the différence between Messages ( object in the
> MessageOccurrenceSpecification object ) and
> MessageOccurrenceSpecification? Because I don't know what's the "Job" of
> MessageOccurenceSpecification...
>
> Thank you for your help!
>
> Benoit
>


--------------040108020407030804030704
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------040108020407030804030704--
Previous Topic:[Acceleo] Defining multiple metamodels within the same template
Next Topic:[Xpand] Cannot access eAnnotations of EEnumLiteral
Goto Forum:
  


Current Time: Thu Mar 28 20:40:41 GMT 2024

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

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

Back to the top