method generateFile undefined for the type MyDslGenerator [message #1748801] |
Mon, 28 November 2016 14:06  |
Eclipse User |
|
|
|
Hello,
I'm working with a simple grammar, and I have problems with the xTend code, in the doGenerate() method. This is the code ...
import org.eclipse.emf.ecore.resource.Resource
import org.eclipse.xtext.generator.IGenerator
import org.eclipse.xtext.generator.IFileSystemAccess
...
class MyDslGenerator implements IGenerator {
override void doGenerate(Resource res, IFileSystemAccess fsa) {
fsa.generateFile('myfile.txt', res.compile);
}
def compile (Resource r) '''
something
'''
The error says "The method generateFile is undefined for the type MyDslGenerator"
I've compared this code with other examples I have, and I don't see any difference. Even more, I think this code worked some weeks ago, and now when I try to work with it again, that compilation error appears, and I don't know how to erase it.
Any clue would be appreciated. Thanks in advance.
Regards,
Aran
|
|
|
|
Re: method generateFile undefined for the type MyDslGenerator [message #1748875 is a reply to message #1748803] |
Tue, 29 November 2016 11:03  |
Eclipse User |
|
|
|
Hello,
Before sending the file I've just tried a last test. I've renamed the file and I've created a new one with exactly the same content as the old one. And now .... it works!!!!!
I promise, I haven't changed any letter in the file, it's exactly the same content, and now there isn't any error. I can't believe it!!! how much time I lost yesterday!!!
Thank you for your interest.
Best regards,
Aran
|
|
|
Powered by
FUDForum. Page generated in 0.04809 seconds