mwe2 with resources from different projects [message #891917] |
Tue, 26 June 2012 10:51  |
Eclipse User |
|
|
|
Hello,
I am trying to setup a generation workflow where dsl files come from (two) different projects. My setup is the following:
project A contains a.dsla, and an mwe2 workflow,
project B contains b.dslb, and an mwe2 workflow. this dsl requires a.dsla resource to be accessible (it contains references to it). The workflow fails, when validating b.dslb it complains that A's types are inaccessible.
Using eclipse test runtime I can simply set up project B to have project A on the build path, then the builder (and editor) works fine.
Using mwe2 (and maven, tycho) I cannot set up the workflow in project B to be able to refer to project A a.dsla. How can I have the org.eclipse.xtext.mwe.Reader to get resources from different projects ?
thanks,
Balázs
|
|
|
Re: mwe2 with resources from different projects [message #891965 is a reply to message #891917] |
Tue, 26 June 2012 13:22   |
Eclipse User |
|
|
|
Hi,
simply make sure you call the standalonesetups for both dsls
in the second workflow
~Christian
On 2012-06-26 14:51:27 +0000, Balazs Molnar said:
> Hello,
>
> I am trying to setup a generation workflow where dsl files come from
> (two) different projects. My setup is the following:
>
> project A contains a.dsla, and an mwe2 workflow,
> project B contains b.dslb, and an mwe2 workflow. this dsl requires
> a.dsla resource to be accessible (it contains references to it). The
> workflow fails, when validating b.dslb it complains that A's types are
> inaccessible.
> Using eclipse test runtime I can simply set up project B to have
> project A on the build path, then the builder (and editor) works fine.
>
> Using mwe2 (and maven, tycho) I cannot set up the workflow in project B
> to be able to refer to project A a.dsla. How can I have the
> org.eclipse.xtext.mwe.Reader to get resources from different projects ?
>
> thanks,
> Balázs
|
|
|
|
|
Re: mwe2 with resources from different projects [message #892766 is a reply to message #892613] |
Fri, 29 June 2012 10:22  |
Eclipse User |
|
|
|
Hello Christian,
Thanks, it works now. It turned out that I was not good enough at specifying multiple resources for one slot (also I was at times tricked by the actual mwe2 resource run from a previous maven build, not the actual I was trying to debug). Now this is the config that seems (started to) work. I am still not very confident in it (I specified both: classPath scanning and a specific folder). So the reader parts:
var slotVar = ResourceLoadingSlotEntry {
slot = 'acc-model'
uri = ".*\\.dsla"
uri = ".*\\.dslb"
}
and the Reader
component = org.eclipse.xtext.mwe.Reader {
path = 'model'
useJavaClassPath=true
register = example.dsla.DslAStandaloneSetup {}
register = example.dslb.DslBStandaloneSetup {}
loadResource = slotVar
}
I have included the path variable to resolve the local (dslb) model file, and classpath scanning is set true to resolve model files from dslb project on the classpath.
|
|
|
Powered by
FUDForum. Page generated in 0.10704 seconds