Questions tagged [xtext]

Use this tag to ask about Eclipse Xtext which is a framework for developing domain specific or general purpose programming languages.

The Xtext framework, which is part of the Eclipse project, is used to develop domain specific or general purpose languages. It provides rich capabilities for integrating a DSL with the Java programming language and the Eclipse IDE.

Using the Xbase expression language in a DSL, it can directly be mapped to Java types. Also accessing Java types in a DSL is easy with Xbase.

For any Xtext language Eclipse's IDE capabilities can be adapted easily by generating class stubs for automatic formatting patterns, scopes and cross references, static validation, content proposals, the outline view or providing quick fixes. Once a stub is implemented it is automatically used by the DSL editor in Eclipse.

1374 questions
55
votes
3 answers

What are the main differences between Jetbrains' MPS and Eclipse Xtext?

I have used Eclipse Xtext in several projects. I loved the ease of defining a grammar over an Ecore (meta)model and letting everything generated for you including awesome Eclipse plugin editor, but I was quite uncomfortable with the underlying EMF…
Karel Smutný
  • 1,100
  • 1
  • 9
  • 17
20
votes
1 answer

What are features of ANTLR that XText Does not provide?

I just came across very nice tool Xtext to create DSL as well as IDE for editing. I did some search on the web and found people saying it does not provide all the features of ANTLR. I am using ANTLR as my parser generator. I am not even sure what…
Tasawer Khan
  • 5,994
  • 7
  • 46
  • 69
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
19
votes
3 answers

Can Xtext be used for parsing general purpose programming languages?

I'm currently developing a general-purpose agent-based programming language (its syntaxt will be somewhat inspired by Java, and we are also using object in this language). Since the beginning of the project we were doubtful about the fact of using…
17
votes
6 answers

Pros/cons of different language workbench tools such as Xtext and MPS?

Does anyone have experience working with language workbench tools such as Xtext, Spoofax, and JetBrains' MPS? I'm looking to try one out and am having a hard time finding a good comparison of the different tools. What are the pros and cons of…
josh
  • 9,038
  • 8
  • 31
  • 37
16
votes
4 answers

ClassNotFoundException: junit.framework.TestCase cannot be found by org.eclipse.xtext.junit_2.4.3.v201309030823

I'm puzzled by this error: java.lang.NoClassDefFoundError: junit/framework/TestCase at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:792) at…
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
12
votes
4 answers

Is it possible to use Xtext without eclipse?

I have a DSL (implemented with ANTLR) for which I need to write a content assist/autocomplete editor. I've ported a prototype of my grammar to Xtext, and I'm quite happy with the quality of the editor it generates. Unfortunately, I cannot use…
Juan Tamayo
  • 155
  • 1
  • 7
12
votes
2 answers

java.lang.OutOfMemoryError: PermGen space in Eclipse Helios

I have created an Xtext plugin in eclipse. Every time I launch it as an 'Eclipse Application' via the context menu, I get a few moments grace before the new Eclipse instance crashes. I switch back to the original instance and in the console window I…
Joeblackdev
  • 7,217
  • 24
  • 69
  • 106
12
votes
1 answer

Unparse AST < O(exp(n))?

Abstract problem description: The way I see it, unparsing means to create a token stream from an AST, which when parsed again produces an equal AST. So parse(unparse(AST)) = AST holds. This is the equal to finding a valid parse tree which would…
11
votes
4 answers

Xtext: grammar for language with significant/semantic whitespace

How can I use Xtext to parse languages with semantic whitespace? I'm trying to write a grammar for CoffeeScript and I can't find any good documentation on this.
nicolaskruchten
  • 26,384
  • 8
  • 83
  • 101
11
votes
2 answers

ANTLR Operator Precedence

How is operator precedence implemented in ANTLR? I'm using the XText/Antlr package at the moment. Edit: I did what sepp2k suggested, and operator precedence works now, but stuff like 3 +* also work now. The operators are basically "falling…
jameszhao00
  • 7,213
  • 15
  • 62
  • 112
10
votes
1 answer

Convert simple Antlr grammar to Xtext

I want to convert a very simple Antlr grammar to Xtext, so no syntactic predicates, no fancy features of Antlr not provided by Xtext. Consider this grammar grammar simple; // Antlr3 foo: number+; number: NUMBER; NUMBER: '0'..'9'+; and its Xtext…
Adam Schmideg
  • 10,590
  • 10
  • 53
  • 83
10
votes
3 answers

What is practical use of IDEA MPS and Eclipse Xtext

Both of those frameworks deal with meta-model: XText (Eclipse) MPS (JetBrain) Do you have example of practical applications based on meta-model transformation with those tools?
S.R
  • 101
  • 3
10
votes
2 answers

Problems with Xtext in eclipse

I'm working on a Java project in eclipse. Trying to open a file through Ctrl+Mouse click, I got a popup that asked me if I want to add "Xtext nature to my project". I said ok. And now, I tried to put on a CSS file the following line: @import…
artaxerxe
  • 6,281
  • 21
  • 68
  • 106
9
votes
1 answer

Advanced Custom Syntax Coloring for Aptana Studio 3 (.less)

I would like to add syntax highlighting for .less for Aptana Studio 3. I found XText but it only seems to work with Eclipse. Apatana doesn't seem to give too many leads into how to do this on their forums, so does anyone have any experience…
samuel.molinski
  • 1,119
  • 10
  • 24
1
2 3
91 92