| [xtend] Ecore post processing [message #698770] |
Wed, 20 July 2011 03:53  |
Balazs Varnai Messages: 21 Registered: June 2011 |
Junior Member |
|
|
Hi,
Consider the following '.ext' file for my xtxt
process(xtext::GeneratedMetamodel this) :
process(ePackage)
;
process(ecore::EPackage this) :
{
var i = 100
}
;
The problem is that language constructs like var/for/if etc., are underlined as syntax errors. I tried to use java 'println' but 'import' also fails. Xtend project nature was added.
Thanks!
|
|
|
|
|
| Re: [xtend] Ecore post processing [message #698788 is a reply to message #698783] |
Wed, 20 July 2011 04:26   |
Balazs Varnai Messages: 21 Registered: June 2011 |
Junior Member |
|
|
Let me quote the xtext2 reference section Customized Post Processing
Quote:
As a last step, the generator invokes the post processor for every generated Ecore model. The post processor expects an Xtend1 file with name MyDslPostProcessor.ext (if the name of the grammar file is MyDsl.xtext) in the same folder as the grammar file.
So I can use xtend2 files in post processing? Thanks!
By the way Eclipse help contains Xtend content, no mention of xtend1/xtend2 which is kind of misleading.
[Updated on: Wed, 20 July 2011 04:29] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09420 seconds