Xtext Web: generate and save [message #1805453] |
Mon, 15 April 2019 09:50  |
Eclipse User |
|
|
|
Hi again.
I try to generate my dsl and save it on disk via xtext web-editor and 'generate' button. The File-name is created in the generator.
fsa.generateFile(e.getName() ,e.compile)
i have to pass a folder but when i press the generate button i get the following message: "The requested generator artifact was not found."
I read s.th. in https://www.eclipse.org/forums/index.php/t/1076582/ but the addition of artifact : 'foo' and other things like filename and path doesn't work.
Where I have to implement the persistence of the generator or is it already there? How does it work?
Thanks again,
Markus
|
|
|
|
|
Re: Xtext Web: generate and save [message #1805456 is a reply to message #1805455] |
Mon, 15 April 2019 10:23   |
Eclipse User |
|
|
|
I need a "to disk" on client side.
Debugging is difficult. I exported it and in the runtime env i have no sources, just compiled jars.
I send the request with jquery:
jQuery('#generate-button').bind("click", function(e) {
var data = {
serviceType: 'generate',
artifact : $("#PolWi").val(),
resource: $("#PolWi").val() + '.mydsl',
project: $("#PolProj").val(),
fullText: editor.getValue(),
contentType: 'text'
};
console.log(data);
jQuery.post('http://localhost:84/polarion/xtext-service', data, function(result) {
console.log("xxx");
});
I look for a way to save the generated file on a folder on client side.
Thanks
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03616 seconds