[Xtext] Problem with basic XBase tutorial [message #1049308] |
Thu, 25 April 2013 13:14  |
Eclipse User |
|
|
|
Hello everyone,
I've heard awesome news about the new possibilities of Xtext 2.4, and so I set out to find a tutorial. I've ended up with the "5 simple steps to your JVM language", which can be found here:
http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/plain/plugins/org.eclipse.xtext.doc/contents/035-domainmodel-java.html
I installed Xtext 2.4 and closely followed the steps, however, I run into compile errors when writing the DomainmodelJvmModelInferrer. The grammar (*.xtext) compiles fine and the MWE2 workflow is running without errors, but Xtend complains about the fields "element.superType" and "element.features" being undefined. I've tried to do the tutorial two times from scratch now, unfortunately without success.
Also, I get a whole flurry of compile warnings in the Xtend file complaining about "discouraged access" due to some project restrictions - but I never specified any restrictions at all!
Is the tutorial up-to-date or did Google mislead me to an outdated page here? Any known errors? Or is it just my plain old foolishness that struck once again? ^_^
Thanks,
Alan
|
|
|
|
|
|
|
|
Re: [Xtext] Problem with basic XBase tutorial [message #1049378 is a reply to message #1049375] |
Thu, 25 April 2013 15:27  |
Eclipse User |
|
|
|
... and that's what you get if you don't copy-paste the code but write it on your own to get a better grasp of how it works ^_^' Thanks Christian, I'm really sorry for the trouble. Don't ask me how that "Domainmodel" identifier got there, I have no idea. Works perfectly now, thanks again!
(Note: the irony here is that most methods actually worked on the Domainmodel instance as well xD I would have realized sooner that I'm using the wrong type if it failed somewhere else as well...)
[Updated on: Thu, 25 April 2013 15:29] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04296 seconds