Skip to main content



      Home
Home » Modeling » TMF (Xtext) » [Xtend] plans for list/array literals?
[Xtend] plans for list/array literals? [message #762027] Wed, 07 December 2011 07:59 Go to next message
Eclipse UserFriend
Hi,

We were about to start implementing our test suites in Groovy, but since we might move to Xtext, it's easier to use Xtend instead. One thing that I miss from Groovy is the literal lists/arrays. These make writing tests much easier.

Are there any plans to add something similar? Or maybe there are already some nifty extension methods to do that?

best regards,
Vlad
Re: [Xtend] plans for list/array literals? [message #762044 is a reply to message #762027] Wed, 07 December 2011 08:21 Go to previous messageGo to next message
Eclipse UserFriend
Am 12/7/11 1:59 PM, schrieb Vlad Dumitrescu:
> Hi,
>
> We were about to start implementing our test suites in Groovy, but since
> we might move to Xtext, it's easier to use Xtend instead. One thing that
> I miss from Groovy is the literal lists/arrays. These make writing tests
> much easier.
>
> Are there any plans to add something similar? Or maybe there are already
> some nifty extension methods to do that?

Yes, they are not extension methods, but implicitly imported:

newArrayList('foo','bar','baz')
newHashSet('a','b','c')
newHashMap(1 -> 'one', 2 -> 'two')

Sven

--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Re: [Xtend] plans for list/array literals? [message #762047 is a reply to message #762044] Wed, 07 December 2011 08:31 Go to previous message
Eclipse UserFriend
Thanks Sven!

I think this should be put on the noteworthy list, it's very helpful.

regards,
Vlad
Previous Topic:Buils xtext projects issues
Next Topic:Xtend Google Group
Goto Forum:
  


Current Time: Wed Jul 16 00:56:46 EDT 2025

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

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

Back to the top