|
|
Re: How to use FileResourceHandler in xtext web for importUri resolution [message #1829645 is a reply to message #1829623] |
Wed, 08 July 2020 08:47 |
aditya ilkal Messages: 4 Registered: July 2020 |
Junior Member |
|
|
Yes, I have checked the examples and have working code where both load and save services work. Using FileResourceHandler, I am able to specify the base directory of the dsl files (/opt/xtext/). I have also added ImportUriGlobalScopeProvider to runtime module, to resolve importUris.
But after the load service loads the file, the validation service does not compile the cross references.
The below is debug information of load/validate services for XtextWebDocument (com/example/dsl/Sample.mydsl). The problem is that the base url (/opt/xtext/) is not resolved in case of validation service, instead uses application launch path. If i copy dsl files to D:/Program%20Files/eclipse/eclipse, the cross referencing works.
Load service
org.eclipse.xtext.linking.lazy.LazyLinkingResource, uri='/opt/xtext/com/example/dsl/Sample.mydsl'
resourceset normalizationmap {/opt/xtext/com/example/dsl/Sample.mydsl=file:/opt/xtext/com/example/dsl/Sample.mydsl}
Validation service
org.eclipse.xtext.linking.lazy.LazyLinkingResource, uri='com/example/dsl/Sample.mydsl'
{com/example/dsl/Sample.mydsl=file:/D:/Program%20Files/eclipse/eclipse/com/example/dsl/Sample.mydsl}
[Updated on: Wed, 08 July 2020 08:52] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03331 seconds