Get textual representation from model [message #1822864] |
Mon, 16 March 2020 08:12 |
Loredana Hozan Messages: 34 Registered: January 2019 |
Member |
|
|
Hello,
I have implemented a wizard that builds my dsl file. In the wizard i have implemented an xtext editor (using: https://github.com/cdietrich/mql/blob/master/org.eclipse.xtext.mql.ui/src/org/eclipse/xtext/mqrepl/ui/handler/ModelQueryLanguageDialog.java ) which i need for the implementation of the last part of my dsl file. The issue that i have is, i have created a synthetic resource for the embedded editor, and i have managed to load the properties of the dsl file (name, imported dsl files, global variables) into the dsl instance, but i don't know how to get its textual representation for the editor. The editor should contain only a small part from the file, and i want to be able to use variables and data that should be in the file, but not visible in the editor. I have tried using serialization, but i got
com.google.inject.ConfigurationException: Guice configuration errors: 1) No implementation for org.eclipse.xtext.parsetree.reconstr.IParseTreeConstructor was bound.
and, unfortunately , i am not authorized to make changes to the dsl grammar that i'm using. I also tried to get the textual representation from the file, but i haven't managed to find a way that works, i guess because it's synthetic. There are the options of saving the file and deleting it if the user does not want to save it, or building it manually, but i really don't think these are the best way to do it. So the main question is, how can i get the textual representation from the Instance and use it in the editor?
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05485 seconds