Specify folder for resolving dsl model files? [message #1809626] |
Fri, 19 July 2019 01:55  |
Eclipse User |
|
|
|
Is there a way to specify a location to search for referenced model files?
I have 2 DSL models (ModelA and ModelB) based on different ecore models where ModelB depends on ModelA. I think I have the EMF part working well enough (for now). I'm trying to generate some output using Acceleo of ModelB but it can't resolve the reference to ModelA, I believe because the URI on the ModelA file is relative to my eclipse project layout which is different from the file system layout.
Here is the eclipse project layout (eclipse Navigator)
- Project1
--- My.ModelA
- Project2
--- My.ModelB
Here is the actual filesystem layout:
- FolderX
--- Project1
----- My.ModelA
- FolderY
--- Project2
----- My.ModelB
In ModelB, ModelA is referenced as href="../Project1/My.ModelA#...." but this causes a problem when I run the Acceleo generation (I'm using the Java Application Runner as using the Acceleo Plugin Application fails for other reasons I don't understand) . When I output the info about an object referenced from ModelA is says eProxyURI: FolderY/Project1/My.ModelA, which is wrong.
I can create a symlink to make the filesystem look like the expected eclipse project layout and that works, but I think what I would like is to have the reference in the DSL model file to be "flat" (i.e href="My.ModelA#....") and then be able to specify a list of search locations for the DSL models (search path = { FolderX/Project1, FolderY/Project2 })
I'm open to other suggestions as well.
I've messed with EMF/Acceleo a little but I still don't know very much. I've seen some posts mentioning the use of a platform URI (?) but I didn't fully understand what that meant. All that to say I might need some hand-holding.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.25744 seconds