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
4
votes
1 answer

Group outline nodes

I'm developing an XTEXT 2.0 plugin. I'd like to group some nodes inside my outline in a "virtual" node. Which is the right way to achieve this result? Currently if i want to group nodes of type "A", in my OutlineTreeProvider I define the following…
hara
  • 3,274
  • 4
  • 37
  • 55
4
votes
1 answer

Maven/Xtext : The string resource '_UI_DiagnosticRoot_diagnostic' could not be located

I'm able to build an executable jar of my Xtext project with Maven (I want to automate the process for CI) But, I have an error during the execution. The execution succeed even if there is this error. I attached the pom.xml for the package…
Valentin
  • 41
  • 4
4
votes
1 answer

Searching for recent GCC GIMPLE grammar

For my finale year project I'm learning about compiler techniques, and currently I'm trying to experiment with the GCC intermediate representation (raw GIMPLE) and getting the control flow graphs from different source files (C, Cpp and Java) using…
4
votes
1 answer

DSL for pretty standard object model with a mapping to an SQL DB

I need a DSL (for Xtext) for describing a pretty standard object model: There are entities They have fields which can either be primitives or references to other entities References can be 1:1, 1:N, N:1 or N:M Not wanting to reinvent the wheel,…
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
4
votes
0 answers

Xtext Generation from multiple model files

I have a grammar defined which can be parsed ok. Due to the nature of the model it makes sense to split the model across multiple files. Following cross references in the IDE is working fine and I am all happy there. My requirement is to generate a…
Petec
  • 271
  • 1
  • 6
4
votes
1 answer

textual syntax for domain models

we have domain models described in some xml format. Given the domain models I want to generate tooling that helps the testers/domain experts to express data in text (and a domain specific test framework later). IDE support is mandatory (IDEA or…
user19937
  • 587
  • 1
  • 7
  • 25
4
votes
1 answer

XText Turn on Backtracking Correctly

I've got a large grammar in X-Text, and it's got some ambiguities. I'm fully aware of the problems this will cause, but I'd like to be able to test the grammar before I look at optimising it. I've been trying to turn on backtrack in the X-Text…
alexp82539
  • 77
  • 1
  • 5
4
votes
2 answers

Xtext custom validator warning - How to mark keyword?

I have the simple Greeting example in xtext. So the DSL is defined like this: grammar org.xtext.example.mydsl.Tests with org.eclipse.xtext.common.Terminals generate tests "http://www.xtext.org/example/mydsl/Tests" Model: greetings+=…
Fabian
  • 547
  • 1
  • 4
  • 17
4
votes
1 answer

How to write custom autocompletion in Xtext?

I just can't find anything about this, only sources about writing a custom autocompletion proposal, which is not what I want (or is it)? Syntax We can use the example syntax for this: Model: greetings+=Greeting*; Greeting: 'Hello' name=ID…
Adrian
  • 2,233
  • 1
  • 22
  • 33
4
votes
3 answers

Can I use XText for a DSL involving an XML file type?

I have defined a small DSL that is mostly written in the form of different types of XML files in conjuction with some property files. This works very well but I wish to create an Eclipse Editor to make editing these files easier for beginners (I…
Chris
  • 4,450
  • 3
  • 38
  • 49
4
votes
1 answer

Xtext: DSL reference to attribute

For example i have a grammar like this one: Bundle: 'Bundle' name= ID '{' car+=Car+ service +=Service* '}' ; Car: 'Car' name=ID extra+=Extra* '}' ; Extra: name= ID '=' type=STRING ; Service: …
JavaNullPointer
  • 1,199
  • 5
  • 21
  • 43
4
votes
1 answer

Xtext error: Registered resource factory is needed

I have an application that accepts a file as an input. Since the files are located in different location, the path will be relative to the .jar location. Example: D:\Test\JAVA_App\Exe is where that tester.jar is placed. So when ran in the windows…
chris yo
  • 1,187
  • 4
  • 13
  • 30
4
votes
1 answer

XText for EClipse & Oslo Intellipad for SQL Server then WHAT FOR .NET?

XText is a great editor and language manufacture for the DSLs in EClipse. I thought that Intellipad is the equivalent in the .NET world, of course as all I get disappointed when Microsoft announce that it would be part of SQL Server. Now if I need…
Ahmed Negm
  • 43
  • 3
4
votes
2 answers

parsing arguments without separating whitespace

In smali the signature of a method taking two integers and returning one integer is written like this: add(II)I For parsing this using xtext, I tried the following: ID'('Type*')'Type Unfortunately this only works with whitespace between the two…
michas
  • 25,361
  • 15
  • 76
  • 121
4
votes
1 answer

Unable to add new validator class to AbstractJavaValidator in Xtext

I have a small problem here . Even though it is related to Xtext i think the solution may be more java related . I am using Xtext to create a grammar which works fine . There was an existing validation called BufferValidator for the grammar . Its…
rockstar
  • 3,512
  • 6
  • 40
  • 63