|
|
|
|
Re: Use .jar as Xtext resource [message #1839034 is a reply to message #1838828] |
Thu, 11 March 2021 15:55 |
Jeremy Davies Messages: 4 Registered: March 2021 |
Junior Member |
|
|
Got it.
Ok that works and I can load each resource into the resourceSet.
Now when I call the EcoreUtil.resolveAll() method I am still left with eProxyURL refs instead of concrete classes, not all the time, but sometimes.
I read on another forum post that I had to use platform:/resource or similar but I don't know how to do that.
Let's imagine my model is this:
- root/A.gen
- root/component/B.gen
And A has an array of class Bs
A.component = [B1, B2, B3]
resourceSet.getResource(URI.createURI("archive:file:///c:/mydir/myjar.jar!/root/A.gen"), true);
resourceSet.getResource(URI.createURI("archive:file:///c:/mydir/myjar.jar!/root/components/B1.gen"), true);
resourceSet.getResource(URI.createURI("archive:file:///c:/mydir/myjar.jar!/root/components/B2.gen"), true);
resourceSet.getResource(URI.createURI("archive:file:///c:/mydir/myjar.jar!/root/components/B3.gen"), true);
I then call:
EcoreUtil.resolveAll(resourceSet);
The resources are LazyLinkedResources - when I inspect the model and look at the proxyInformation variable I see an array of triples, the first of which points at a reference, as shown below:
If I'm looking at the in-memory model for A.gen I then see something similar to:
com.blah.A@250268ef (eProxyURI: archive:file:///c:/mydir/myjar.jar!/root/components/B1.gen#|1)
I just want to be able to resolve that reference and bring the contents of B into that location.
[Updated on: Thu, 11 March 2021 15:59] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05630 seconds