|
|
|
|
|
|
|
|
|
Re: how to override and bind ImportUriResolver [message #1736973 is a reply to message #1736971] |
Mon, 04 July 2016 18:30 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
YOur uri converters makes limited sense in a standalone app.
@InjectWith(MyDslInjectorProvider)
class MyDslParsingTest{
@Inject
ParseHelper<Model> parseHelper
@Test
def void loadModel() {
new StandaloneSetup().platformUri = ".."
URIConverter.URI_MAP.put(URI.createURI("platform:/plugin/org.xtext.example.mydsl/"), URI.createURI("platform:/resource/org.xtext.example.mydsl/"))
val result = parseHelper.parse('''
import my1
usage AAAAA
''')
Assert.assertNotNull(result)
Assert.assertEquals((result.usages.get(0) as Usage).name.name, "AAAAA")
}
}
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05150 seconds