XText importing a specific file extension [message #1794744] |
Wed, 05 September 2018 23:31 |
Agner Ballejo Messages: 3 Registered: September 2018 |
Junior Member |
|
|
Hello everyone, I'm new here and I'm new with Xtext!
I'm trying to make a grammar for importing Schemas, for example, XSD.
I'm trying to import using "importURI" attribute, but I'm not getting any success on this...
See my grammar code below:
Import:
'import' importURI=STRING 'as' name=ID
;
And i also added a new extension for ResourceServiceProvider as XSD:
<extension
point="org.eclipse.xtext.extension_resourceServiceProvider">
<resourceServiceProvider
class="mygrammar.resource..XsdResourceServiceProvider"
uriExtension="xsd">
</resourceServiceProvider>
</extension>
But when I test with, for example, the following syntax: import "test.xsd" as Idm
My ResourceServiceProvider is never called, I tried to overrides ImportUriGlobalScopeProvider, but the method "getScope" is never called with my resource...
And I also need to create a "free" URI, for example, I would like to use a URI like: "C:/test.xsd".
I tried to follow some topics here, but without success :/
Can anyone help me with this? ;)
Thanks a lot!
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04248 seconds