Multiple model instances [message #1050550] |
Sat, 27 April 2013 06:54  |
Eclipse User |
|
|
|
Hi all,
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.
My questions:
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)
Thanks,
Christian
|
|
|
Re: Multiple model instances [message #1050605 is a reply to message #1050550] |
Sat, 27 April 2013 08:46  |
Eclipse User |
|
|
|
Hi,
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
|
|
|
Powered by
FUDForum. Page generated in 0.24922 seconds