|
|
|
Re: Using Existing Ecore in XText [message #1397139 is a reply to message #1397057] |
Wed, 09 July 2014 08:56 |
|
I Still cannot reproduce that
grammar org.xtext.example.mydsl.MyDslA with org.eclipse.xtext.common.Terminals
generate myDslA "http://www.xtext.org/example/mydsl/MyDslA"
Model:
elements+=AElement*;
AElement:
'aelement' name=ID;
grammar org.xtext.example.mydsl.MyDslB with org.eclipse.xtext.common.Terminals
import "http://www.xtext.org/example/mydsl/MyDslA" as a
generate myDslB "http://www.xtext.org/example/mydsl/MyDslB"
Model:
elements+=BElement*;
BElement:
'belement' name=ID 'to' a=[a::AElement];
module org.xtext.example.mydsl.GenerateMyDslB
import org.eclipse.emf.mwe.utils.*
import org.eclipse.xtext.generator.*
import org.eclipse.xtext.ui.generator.*
var grammarURI = "classpath:/org/xtext/example/mydsl/MyDslB.xtext"
var fileExtensions = "mydslb"
var projectName = "org.xtext.example.mydslb"
var runtimeProject = "../${projectName}"
var generateXtendStub = true
var encoding = "UTF-8"
Workflow {
bean = StandaloneSetup {
scanClassPath = true
platformUri = "${runtimeProject}/.."
// The following two lines can be removed, if Xbase is not used.
registerGeneratedEPackage = "org.xtext.example.mydsl.myDslA.MyDslAPackage"
registerGenModelFile = "platform:/resource/org.xtext.example.mydsla/model/generated/MyDslA.genmodel"
}
....
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03736 seconds