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

How invoke xtend2 generator from java class?

I use Xtext framwork for my DSL and I want to generate code by a toolbar bottom. I get the file selected from workbench but how can I call Xtend generator? I don't know how I can get the resource param for doGenerate.
andrex_jux
  • 25
  • 1
  • 5
0
votes
1 answer

How to invoke Xtext parser/JvmModelInferrer from a Java project

I have implemented a simple little DSL that generates classes from input files, by using the JvmModelInferrer approach. I am trying to figure out how I can invoke the parser and the code genarator within the code of a regular java project. So at…
Marcus Mathioudakis
  • 837
  • 1
  • 6
  • 19
0
votes
1 answer

Xtext: Inconsistent stackmap frames error leading to broken code generation when using Xbase

I encountered what appeared to be an instance of eclipse Bug 380313 which is marked as fixed. My grammar is the following: grammar org.xtext.example.hyrule.HyRule with org.eclipse.xtext.common.Terminals // with org.eclipse.xtext.xbase.Xbase …
Marcus Mathioudakis
  • 837
  • 1
  • 6
  • 19
0
votes
1 answer

How to use xtext inferred JVM model outside of xtext project?

In the Inferring a JVM Model section of the Xtext documentation (http://www.eclipse.org/Xtext/documentation.html#_17) it starts by saying: "In many cases, you will want your DSLs concepts to be usable as Java elements. E.g. an Entity will become a…
Marcus Mathioudakis
  • 837
  • 1
  • 6
  • 19
0
votes
1 answer

generating classes for evaluating Xbase expressions in Xtext?

I am trying to design a little DSL for checking constraints on variables. My grammar at the moment looks like this: Start: varDeclarations += XVariableDeclaration* rules+=Constraint*; Constraint: {Constraint} 'FOR' 'PAYLOAD'…
Marcus Mathioudakis
  • 837
  • 1
  • 6
  • 19
0
votes
1 answer

Language editor/generator on normal eclipse

I've created my DSL language and code generator using Xtext nad Xtend. But when I want to use it, I need to open my Xtext project and click "Run as-> Launch Runtime Eclipse". Is it possible to have my editor/generator in the normal eclipse run? In…
archev
  • 21
  • 2
  • 7
0
votes
1 answer

StringTemplate and Xtext

In my current work, I have written code generator using String Template without thinking about Parser ( I am instantiating Template files using direct Java Object). and code generator generator generates nice Java code. Now, I have started to write…
user-517752
  • 1,188
  • 5
  • 21
  • 54
0
votes
1 answer

org.eclipse.xtext.linking.impl.IllegalNodeException popups an error instead of just being written to the log

I am writing an editor based on xtext. (v 2.2.1)(Eclipse Indigo) I have a class that extends DefaultLinkingServic and overrides the method: public List getLinkedObjects(EObject context, EReference ref, INode node) throws IllegalNodeException. The…
0
votes
1 answer

Eclipse xtext- Xml grammar

I am writing a project using Eclipse xtext framework. I want to make a grammar for XML language. How can I parse open and close tags ? When I give something like this: Body: '<'Type'>'''; Type: name=ID; It allows to have tags…
ruhungry
  • 4,506
  • 20
  • 54
  • 98
-1
votes
1 answer

XText validation keeps loading and no response in Eclipse while editing Cucumber Feature file

I am using Eclipse IDE. BDD project(Cucumber-Java-Selenium). While editing the feature file, I am facing the issue. The Tool stops loading and goes to "no response" state while editing the feature file. It is back after several minutes(say 10-15…
-1
votes
1 answer

GenerateDsl.mwe2 error if changing the Target Platform

I have a XText project where I have a gramair (DLS.xtext file). I copied my XTExt project to an Eclipse workspace where I have changed the target platform, but I have included in this target platform the XText, XTend plugins). After changing the…
georgiana_e
  • 1,809
  • 10
  • 35
  • 54
-1
votes
1 answer

Why does Xtext no longer generates Xtend classes?

I am refactoring an Xtext project developed on an older version and notice that, by default, the Xtext framework now generates Java classes in place of what used to be Xtend classes. Is the Xtext project moving towards Java recently? Is this to…
-1
votes
1 answer

How to replicate source code folder structure for generated code

I created a simple DSL in Xtext. All my source files (".src") are in a set of folders under "src". I want the generated files (".obj") to be created inside "src-gen", but preserving the folder structure of the source files. The below (default) code…
mzattera
  • 13
  • 5
-1
votes
1 answer

XTend Second Eclipse Application not updating

I am a Student and currently doing my BSc in Computer Science and Software Engineering. Out of curiosity I have started to spend my free time on DSL's and have bought the Book "Implementing Domainspecific Languages with XText and Xtend" of Lorenzo…
xXRanaXx
  • 3
  • 2
-1
votes
1 answer

xtext imports not working

I'm just getting started with xtext 2.9.2 on IntelliJ IDEA 2016.3. I try to follow the simple 15 Minutes Tutorial. The first iteration was fine, but the imports do not work. I have created 2 repos on github: the project which defines the DSL and…
TmTron
  • 17,012
  • 10
  • 94
  • 142
1 2 3
91
92