Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 12:56 Go to next message
Eclipse UserFriend
No Message Body

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

Report message to a moderator

Re: Find property value over a set [message #1827057 is a reply to message #1827054] Wed, 06 May 2020 13:29 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
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 13: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 15:15 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
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: Tue Apr 23 11:49:36 GMT 2024

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

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

Back to the top