How can I traverse the EMF object tree generated by Xtext?
Posted
by reprogrammer
on Stack Overflow
See other posts from Stack Overflow
or by reprogrammer
Published on 2010-05-01T16:39:49Z
Indexed on
2010/05/01
16:47 UTC
Read the original article
Hit count: 364
I'm using Xtext to define my DSL. Xtext generates a parser that lets me traverse the EMF model of my input DSL. I'd like to translate this EMF model into some other tree. To do this translation, I need to traverse the tree. But, I couldn't find a visitor class for the EMF model generated by Xtext. The closest thing that I've found is a Switch class that visits a single node. I can traverse the EMF model myself and invoke the Switch class on each node that I visit. But, I wonder if there exists a visitor functionality in Xtext that implements the model traversal.
© Stack Overflow or respective owner