Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » Find property value over a set
Find property value over a set [message #1827054] Wed, 06 May 2020 08:56 Go to next message
Eclipse UserFriend
No Message Body

[Updated on: Wed, 24 June 2020 07:47] by Moderator

Re: Find property value over a set [message #1827057 is a reply to message #1827054] Wed, 06 May 2020 09:29 Go to previous messageGo to next message
Eclipse UserFriend
Hi

Your problem is far from clear but "only once" usually has two approaches

a) use a Set so that there is only one element from which to do something once

b) use a helper with at least one Class-typed argument so that the multiple invocations of the helper retuirn the same value.

Regards

Ed Willink
Re: Find property value over a set [message #1827060 is a reply to message #1827057] Wed, 06 May 2020 09:56 Go to previous messageGo to next message
Eclipse UserFriend
Hello Ed,

Thank you for your quick reply.

Sorry if it was not clear.
What I try to do is to find is it exist in my set of Foobar, one instance who has the property type equal to 'foo'. And the same in the case of 'bar'.
I am speaking about only once, meaning that even if I have several instance that has the value 'foo', I want to generate the text 'This is foo.' once and not as much as instances with this value (as in my 'solution').
Re: Find property value over a set [message #1827070 is a reply to message #1827060] Wed, 06 May 2020 11:15 Go to previous message
Eclipse UserFriend
Hi

I suggest you read up on OCL and collections/iterations.

Regards

Ed Willink
Previous Topic:How can I get a class which is inherited from another class in acceleo
Next Topic:Getting NullPointerException while running JET Transformation Project in Eclipse
Goto Forum:
  


Current Time: Sat Jun 21 14:26:37 EDT 2025

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

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

Back to the top