Two different DSL and the workflow [message #650311] |
Mon, 24 January 2011 06:25  |
Eclipse User |
|
|
|
Hello everyblody.
I have create two dsl.
The first descibe "Rule" objecr in a file .metarepDSL
For example :
rule rule1 {
author jguidoux
date 20/11/2011
version v1
}
the other DSL use the declared rules in the other langagge.
the extension of this language is repoDSL
this is an example :
Repository test
import rules.*
Groupe g1 {
rule rule1
}
With xtext, no problem, the content assist works. (I can find the reference to rule1)
But in the generator, when I run the workflow, I have this message :
[CODE][
1 error:
test.repoDSL - /home/jeremie/test/com.tocea.xtext.repositoryDSL.generator/s rc/model/test.repoDSL
6: Couldn't resolve reference to Rule 'rule1'.
java.lang.RuntimeException: Problems running workflow workflow.RepositoryDSLGenerator: Validation problems:
1 error:
test.repoDSL - /home/jeremie/test/com.tocea.xtext.repositoryDSL.generator/s rc/model/test.repoDSL
6: Couldn't resolve reference to Rule 'rule1'.
/CODE]
the workflow can't find the reference to the other language.
these two file are in the same folser : 'src/model"
this is my workflow ::
module workflow.RepositoryDSLGenerator
import org.eclipse.emf.mwe.utils.*
var targetDir = "src-gen"
var fileEncoding = "UTF-8"
var modelPath = "src/model"
Workflow {
bean = StandaloneSetup {
registerGeneratedEPackage = "com.tocea.emf.metaRepository.model.metaRepository.MetaRepositoryPackage"
registerGeneratedEPackage = "com.tocea.emf.metaRepository.model.repository.RepositoryPackage"
}
component = org.eclipse.xtext.mwe.Reader {
// lookup all resources on the classpath
// useJavaClassPath = true
// or define search scope explicitly
path = modelPath
// this class will be generated by the xtext generator
register = com.tocea.xtext.RepositoryDSLStandaloneSetup {}
load = {
slot = "repository"
type = "Repository"
}
}
component = org.eclipse.xpand2.Generator {
expand = "templates::Template::main FOR repository"
outlet = {
path = targetDir
}
fileEncoding = fileEncoding
}
}
I hope it is possible to do that.
Thanks,
Jérémie
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.27726 seconds