I guess EcoreUtil. GetAllProperContents(Resource, false) might be what you are looking for. You'll get a TreeIterator that will traverse the contents of the resource.
Pass the result of iter.next() into a Switch and perform the transformation logic depending on the element type.
If you consider this thread, Switch (used here for instance) is pretty much the official visitor pattern for XText. You also have the custom Validation process: The purpose of the AbstractDeclarativeValidator is to allow you to write constraints in a declarative way – as the class name already suggests. That is instead of writing exhaustive if-else constructs or extending the generated EMF switch you just have to add the @Check annotation to any method and it will be invoked automatically when validation takes place.
That may be not exactly what you need, though.
VonC, I had already read the thread you referred to. I'm well aware of the Switch class. I was just wandering if there is a class that implements the traversal logic, too.
– reprogrammer May 1 '10 at 17:30 @reprogrammer: I thought so, just wanted to point out the apparent "only XText visitor" status of Switch. – VonC May 1 '10 at 18:35.
– reprogrammer May 1 '10 at 21:20 @reprogrammer check out the documentation: help.eclipse. Org/galileo/index. Jsp?
Topic=/org.eclipse.xpand. Doc/… – Gabriel Å Ä? Erbák May 1 '10 at 22:14.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.