Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Load a xtext-file to Xtext Web(resource factory needed or maybe not)
Load a xtext-file to Xtext Web [message #1805427] Mon, 15 April 2019 09:10 Go to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hi again,

I customize the xtext Web Editor Ace.
I have a saved xtextfile, created with the editor, in a database. I try to load it again in the editor. For this i made my own service in the servlet.
I've got some code for the IServerResourceHandler get()-Method but this fails in my method.

val uri = URI.createFileURI("c:\\tmp\\Load.mydsl)")
val resourceSet = resourceSetProvider.get(file, serviceContext)
val resource = resourceSet.getResource(uri, true) as XtextResource
return documentProvider. get(resourceId, serviceContext) => [
setInput(resource)
]
Exception: Cannot create a resource for 'file:/c:/tmp/Load.mydsl)'; a registered resource factory is needed

I have the file in c:\tmp and want to show it in the editor for update purpose.
I'm not sure if i need this factory and i dont't know how.

Thanks,
Markus
Re: Load a xtext-file to Xtext Web [message #1805429 is a reply to message #1805427] Mon, 15 April 2019 09:14 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
the ".mydsl)" looks like a bad file extension to me

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Load a xtext-file to Xtext Web [message #1805434 is a reply to message #1805429] Mon, 15 April 2019 09:55 Go to previous message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
omg. So easy to solve.
Thanks
Previous Topic:Xtext Web: 'The parameter \'serviceType\' is required.'
Next Topic:For each type a ModelInferrer?
Goto Forum:
  


Current Time: Fri Apr 19 19:12:53 GMT 2024

Powered by FUDForum. Page generated in 0.02495 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top