Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] select distinct
[Acceleo] select distinct [message #904502] Tue, 28 August 2012 10:44 Go to next message
Eclipse UserFriend
Is it possible to get the distinct elements of a set?
Suppose I need to include the header files of the types of my classifiers' properties. I'd like to include each header file once though there are more than one property with that type.
Re: [Acceleo] select distinct [message #904506 is a reply to message #904502] Tue, 28 August 2012 10:53 Go to previous messageGo to next message
Eclipse UserFriend
Hi

All elements of a Set are inherently distinct.

If you want a different distinction criterion perhaps you want
->isUnique(...) or just a Set of your alterante view.

Regards

Ed Willink

On 28/08/2012 15:44, Andrea Sindico wrote:
> Is it possible to get the distinct elements of a set? Suppose I need
> to include the header files of the types of my classifiers'
> properties. I'd like to include each header file once though there are
> more than one property with that type.
Re: [Acceleo] select distinct [message #904798 is a reply to message #904506] Wed, 29 August 2012 03:16 Go to previous message
Eclipse UserFriend
Hi Andrea,

To complete Ed's answer, if you have a collection which is not unique and need all distinct entries it contain, convert it to a set :

[collection->asSet()/]


or if you need the order to be constant

[collection->asOrderedSet()/]


Laurent Goubet
Obeo
Previous Topic:[Acceleo] Standalone problem
Next Topic:[Acceleo] select over a Set(String) object
Goto Forum:
  


Current Time: Fri Jul 04 11:22:03 EDT 2025

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

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

Back to the top