xtext

IntelliJ Xtext Couldn't Resolve Reference to Grammar 'org.eclipse.xtext.common.Terminals'

◇◆丶佛笑我妖孽 提交于 2019-12-25 12:09:45
问题 I haven't had success in installing Xtext with Eclipse (see Xtext Bundle org.eclipse.emf.mwe.utils cannot be resolved and Can't Create Xtext Project in Eclipse), so I thought I'd try IntelliJ IDEA. However, when I created the default project, I got the error "Couldn't Resolve Reference to Grammar 'org.eclipse.xtext.common.Terminals'". Isn't this library automatically installed with Xtext? At this point, I am stuck. Can anybody definitively resolve this problem? 来源: https://stackoverflow.com

IntelliJ Xtext Couldn't Resolve Reference to Grammar 'org.eclipse.xtext.common.Terminals'

北城以北 提交于 2019-12-25 12:09:24
问题 I haven't had success in installing Xtext with Eclipse (see Xtext Bundle org.eclipse.emf.mwe.utils cannot be resolved and Can't Create Xtext Project in Eclipse), so I thought I'd try IntelliJ IDEA. However, when I created the default project, I got the error "Couldn't Resolve Reference to Grammar 'org.eclipse.xtext.common.Terminals'". Isn't this library automatically installed with Xtext? At this point, I am stuck. Can anybody definitively resolve this problem? 来源: https://stackoverflow.com

Xtext: What does this exception mean?

心不动则不痛 提交于 2019-12-25 08:48:34
问题 I have a Xtext grammar which throws following exception when I try to generate Xtext artifacts (It starts and in the end it throws the exception(s)). My Outline (first few lines): 0 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering platform uri 'C:\Users\Robert Adam\Documents\eclipse.luna\workspace' 451 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Adding generated EPackage 'org.eclipse.xtext.xbase.XbasePackage' 701 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered

XText entity example, primitive type

做~自己de王妃 提交于 2019-12-25 07:10:00
问题 What I'm trying to do, is modify a bit the basic entity DSL example, so that it supports primitives, and something like this can be done: entity Dog { name : String } entity Person { name : String dog : Dog } So that the type of the members can be either a reference to the name of another entity, or a predefined primitive. I'm also looking for a way, so there is content assist in the generated editor for both the primitives, and the entity names. Here is my .xtext so far: Model: (entites+

Xtext - The type com.google.inject.Inject is not on the classpath

拥有回忆 提交于 2019-12-24 15:04:32
问题 I am using the following code in JvmModelInferrer.xtend to generate a Java class @Inject extension JvmTypesBuilder def dispatch void infer(Model element, IJvmDeclaredTypeAcceptor acceptor, boolean isPreIndexingPhase) { acceptor.accept(element.toClass(element.name)) [ annotations += annotationRef(Inject); ] } When I try to run the whole project, I get the following error. 5226 [main] ERROR org.eclipse.xtext.xbase.jvmmodel.JvmTypesBuilder - Error initializing JvmElement java.lang

linking xtext editor support with external ANTLR parser

时光怂恿深爱的人放手 提交于 2019-12-24 12:01:49
问题 My current project (name it IoTSuite) takes high-level specifications, parses them, and generates code in Java and Android. In this project, I have written ANTLR grammar to parse the high-level specification and I have used StringTemplate for the code generator. However, due to nice editor support and syntax coloring features, I have used the xtext grammar(same as the ANTLR grammar, but it has been written in xText). Now, I perform the following three steps: Step 1: I have written xtext

How do I attach some cached information to an Eclipse editor or resource?

我的未来我决定 提交于 2019-12-24 01:53:39
问题 I'm developing a DSL using Eclipse's Xtext framework. For the content assist/code completion, I have an expensive process which generates me a list of strings. How do I cache the result of that process? Long story: My DSL interfaces with Groovy scripts. The scripts provide methods which I offer in certain places in my DSL. This is pretty slow, even when I use a regexp to parse the methods of the scripts. So I'd like to cache the results of the script analysis. From my analysis, the analysis

Meshing Acceleo with Xtext

南笙酒味 提交于 2019-12-24 01:08:38
问题 I am in the middle of an Acceleo Transformation aimed at producing code (i.e. Java) from an input UML model. Some elements of this UML model (i.e. Activities Opaque actions) contain some text which is conform to an Xtext grammar and I'd like to get the equivalent AST Ecore representation in the Acceleo transformation. To this end I have developed a Java class with a method which takes as input a string, containing the DSL excerpt, and produces an Ecore model conform to it (see http://www

xtext: expression/factor/term grammar

怎甘沉沦 提交于 2019-12-23 02:01:29
问题 This has got to be one of those well-known examples that's somewhere on the internet, but I can't seem to find it. I'm trying to learn XText and I figured a calculator expression parser would be a good start. But I'm getting syntax errors in my grammar: Expression: Term (('+'|'-') Term)*; Term: Factor (('*'|'/') Factor)*; Factor: number=Number | variable=ID | ('(' expression=Expression ')'); I get this error in the Expression and Term lines: Multiple markers at this line - Cannot change type

Xtext Project: Add Jar Libraries with the Project Wizard Manager into the Classpath/Referenced Libaries of the clients Project

眉间皱痕 提交于 2019-12-22 13:59:47
问题 I have been searching quite a lot for this problem, however I can't really find a proper solution or a how-to manage this one. I have written a simple DSL for generating some code via Xtext and Xtend. I optionally use the project wizard in the UI project of Xtext to be able to create an individual project for my grammar and plugin. I am able to create the project with ease, however I still need to add some important dependencies into my class path of the clients project. It seems to be a bit