Questions tagged [xtend]

Xtend is a statically typed programming language that transcompiles to Java. It aims to produce more readable code than traditional Java.

Xtend is a programming language that transcompiles to Java. It aims to produce more readable code than traditional Java by reducing the amount of boilerplate code. It is developed by the Eclipse foundation.

415 questions
19
votes
5 answers

How can I use Eclipse's new Xtend language in my Android project?

I'd like to write Java classes in the Xtend language (simply because its way more terse), and have it compile back down into Java classes of which I can use in my Java project. Just like coffeescript. How can I do this? I tried creating an Xtend…
nubela
  • 1
  • 24
  • 75
  • 123
10
votes
1 answer

Load EMF Model instance in XTend

I am building a code generator in XTend where I already have an input model and meta model. That is, I use ATL to generate the input model for my XTend code generator (as part of a transformation sequence to gradually lower the abstraction level,…
Marten Sytema
  • 1,906
  • 3
  • 21
  • 29
10
votes
6 answers

XTend For-Loop Support and Adding Range Support

I can't seem to find a great way to express the following in Xtend without resorting to a while loop: for(int i = 0; i < 3; i++){ println("row "); } println("your boat"); So, I guess my question has two parts: Is there a better way to do the…
Bface
  • 307
  • 1
  • 2
  • 12
8
votes
2 answers

Command line compiler for XTend

Hi allI've found XTend (http://xtend-lang.org) and it really sounds great! But, I can't see any standalone command line compiler for this language. It seems only to run under eclipse. I've done some research, and found some people saying, that it…
8
votes
2 answers

How to unit Test for Xtext

I have to test my grammar (written with Xtext). I've see it is possible with use of unit test, but I can't find a good tutorial about it. Can you help me?
Tommaso DS
  • 211
  • 2
  • 14
7
votes
3 answers

What are the disadvantages of Xtend?

What are the disadvantages/drawbacks of using Xtend?
Belun
  • 4,151
  • 7
  • 34
  • 51
6
votes
1 answer

Xtext 2.9 scope provider

Xtext 2.9 changed the way scope providers work and I don't understand how they work now. Let's say I have the following grammar: grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals generate myDsl…
J Burns
  • 63
  • 3
6
votes
1 answer

How can I distinguish between Xtext, Xtend and similar Eclipse technologies?

What are the characteristics, differences and similarities of all these Eclipse-based technologies starting with X (Xtext, Xtend)? Are there any more to learn about?
thSoft
  • 21,755
  • 5
  • 88
  • 103
6
votes
1 answer

Xtext get project root directory from validator

I need to get to validate existence of specific file in Xtext project. The file has similar path as validated object but other root directory, for…
Hersh
  • 630
  • 4
  • 16
6
votes
1 answer

Xtext multiple generators

I use Xtext plugin for eclipse to define my language and generate some files from it. The project is big and I would like to use multiple generators to generate my files, in addition to default generator, generated by the plugin. I tried this…
Hersh
  • 630
  • 4
  • 16
6
votes
3 answers

xTend: How to stop a variable from printing in output?

Lets say you have the following code in xTend: class StackOverflowGenerator { def generate()''' «var counter = 0» «FOR i : 0 ..<10» Line Numnber: «i» «counter = counter + 1» «ENDFOR» ''' } This will generate output in the…
GSUgambit
  • 4,459
  • 6
  • 25
  • 31
6
votes
1 answer

Can't find resource file after exporting to a runnable JAR

I have a project structure that looks like this: Tester \-- src |-- hello.java \-- vocabulary.csv I load the csv file using getResource: url = this.getClass().getResource("vocabulary.csv"); System.out.println(url.getPath()); new…
schrobe
  • 767
  • 2
  • 8
  • 29
6
votes
1 answer

Declaring an array of int in xtend

How can I declare an array of int in xtend? I've tried ArrayList but I get the error "The primitive 'int' cannot be a type argument".
chris yo
  • 1,187
  • 4
  • 13
  • 30
5
votes
4 answers

class constructors in Xtend

I'm trying out Xtend. Is it possible to make constructors? It seems so simple, but I'm getting an error when I try something like this: class Scope extends Rect { public Scope(){ super() } }
brendanzab
  • 950
  • 1
  • 11
  • 29
5
votes
3 answers

Is it possible to write comments in Xtend-templates?

Is it possible to write comments inside an Xtend template? (for example in order to quickly comment out an IF-statement or anything)
cwde
  • 214
  • 1
  • 10
1
2 3
27 28