generateTracedFile is undefined for the type IFileSystemAccess2 [message #1815981] |
Wed, 16 October 2019 09:23  |
Eclipse User |
|
|
|
Hello again,
I am trying to modify my generator according to TypeFox demo, but I am struggling really hard.
First, the generateTracedFile method is not recognised in my project, even with TracingSugar imported (no typo, I have tried to copy-paste the name).
The following code fails:
override void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context)
{
fsa.generateTracedFile("TracedFile.h", resource.contents.head as MyLanguage, '''Hurray''') //here MyLanguage is the equivalent of 'Model' in demo
}
with the following message:
"The method generateTracedFile(String, MyLanguage, String) is undefined for the type IFileSystemAccess2"
When I create a TracingSugar instance, then the following code does not give error:
override void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context)
{
val tracer = new TracingSugar()
tracer.generateTracedFile(fsa, heading.feature.name + "TracedList.h", resource.contents.head as MyLanguage, '''Hurray''')
}
but it throws NullPointerException for TracingSugar.location.
Can someone point it out what am I doing wrong?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03563 seconds