I'm currently kind of lost in the XText/EMF world, and have a few basic questions:
I'm developing a custom outline view, that does not only show the outline of the current model file but the outline for the complete model (useful for models split over several files).
My current approach is to search for all project files ending with my model extension and then load them via a resourceset and compute the overall outline.
1. Since xtext provides cross file references there must already be a complete model somewhere, is there a way to access it?
2. Is there a way to get noticed about incremental model changes or at least get notified when anything in the model changes?
3. Is there a single instance of my model, or is a new one created everytime I do a ".load(InputStream inputStream, Map<?, ?> options)
there is no complete model. there is only the index. (aka IResourceDescriptions)
it contains all exported objects. (flat list - no loading required - at least if you have all information you need in the index - you can customize this via IDefaultResourceDescriptionStrategy)
Additionally you can add a Listener to IBuilderState
THis should give you starting points where to digg