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
9
votes
2 answers

Writing a custom Xtext/ANTLR lexer without a grammar file

I'm writing an Eclipse/Xtext plugin for CoffeeScript, and I realized I'll probably need to write a lexer for it by hand. CoffeeScript parser also uses a hand-written lexer to handle indentation and other tricks in the grammar. Xtext generates a…
Adam Schmideg
  • 10,590
  • 10
  • 53
  • 83
9
votes
2 answers

Editor generator for ANTLR grammars?

I'm using ANTLR for creating a new general purpose programming language and I'm quite happy with it. Due to the fact that I would like to provide good tools for ease the development of programs written with my language I'm starting to thinking on…
9
votes
3 answers

How to disable css warning "Unknown property" in Eclipse Mars?

I get many "Unknown property" warnings in my css files. This might be due to the fact that I have e(fx)clipse 2.0 and the Eclipse Web Developer Tools installed. If I open the css files with the e(fx)clipse css editor and add /SuppressWarnings/ the…
Stefan
  • 10,010
  • 7
  • 61
  • 117
9
votes
1 answer

Disable "Add Xtext nature" dialog in Eclipse

I'm using a custom DSL with Xtext grammar. In my workspace there are several projects, one of them is the development relevant project, another one is for testing purposes. In the testing project there are a lot (> 5000) of files of my DSL, required…
moeTi
  • 3,884
  • 24
  • 37
8
votes
2 answers

What's the relationshiop between Xtext and ANTLR?

I heard that Xtext ultimately uses ANTLR but their grammar specification files have somewhat different formats. So what's the relationship between the two?
oddin
  • 391
  • 3
  • 11
8
votes
2 answers

Xtext example of a scoped object

I'm looking for an example (in XText) of how to implement code completion on an user defined objects members. As far as I can see I need to use IScope, but how all this wires together is unclear. Given that trait is a user defined type, how do I go…
BefittingTheorem
  • 10,459
  • 15
  • 69
  • 96
8
votes
1 answer

(A better way to) Get files within a project using Eclipse and XText

I'm writing an XText editor, and doing some semantic highlighting. Part of the language I'm parsing refers to files, which should exist in the project. I'd like to highlight based on whether these files are in the correct place. At the moment, I've…
mo-seph
  • 6,073
  • 9
  • 34
  • 35
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
8
votes
2 answers

XText programmatically parse a DSL script into an Ecore model

I need to programmatically turn a text conform to an XText grammar into an AST conform to an Ecore meta-model generated by XText from the same grammar. I know XText also generate the Java classes implementing such parser but I don't know either…
Andrea Sindico
  • 7,358
  • 6
  • 47
  • 84
7
votes
2 answers

Has anybody fully implemented an XText editor in an IViewPart

Basically I need to implement a full XText editor in an IViewPart. I have most of it working based on the XText Forms Integration project. Unfortunately, this is not a full implementation on an XText editor, and I wondered if anybody are aware of…
Tonny Madsen
  • 12,628
  • 4
  • 31
  • 70
7
votes
1 answer

Xtext custom cross-references

I've been working on an Xtext-based Eclipse plugin for a language we use in-house. This language might have a statement of the form: run : /some/file/path/foo.txt ... and ultimately I want to provide a custom Location provider so that pressing F3…
Exponent
  • 492
  • 1
  • 11
  • 18
7
votes
1 answer

Xtext - multiple files language

I'm pretty new to Xtext, so I don't understand very well all of the associated concepts. There's one question in particular I couldn't find an answer to: how can I manage a grammar for a language with multiple files? The DSL I'm working on…
S.W.
  • 83
  • 5
7
votes
2 answers

single click for getting xText editor support

In my current work, I want provide xText editor support ( because of its code completion, syntax high-lighting) to the programmers of my domain specific language. I have written grammar in xText. To provide xText editor support, I am…
user-517752
  • 1,188
  • 5
  • 21
  • 54
6
votes
2 answers

Variable named interface

I need a variable that represents an interface. I was wondering if there is a "standard" name for such a variable, like for example the clazz for a Class variable. I was thinking of naming it aInterface, but I don't realy like this name...
Deelazee
  • 493
  • 2
  • 9
  • 18
6
votes
2 answers

Projectional Textual Editor?

are there any textual, projectional Editors available? How do they work especially regarding updating subtrees? Are there any frameworks available for building them? Do you know any papers describing their design? How is this style of "parsing"…
Stefan K.
  • 7,701
  • 6
  • 52
  • 64
1
2
3
91 92