Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Multiple model instances
Multiple model instances [message #1050550] Sat, 27 April 2013 10:54 Go to next message
Christian Pelster is currently offline Christian PelsterFriend
Messages: 23
Registered: January 2010
Junior Member
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)


Re: Multiple model instances [message #1050605 is a reply to message #1050550] Sat, 27 April 2013 12:46 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13322
Registered: July 2009
Senior Member

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

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:how to specify to use a name between single quotes in xtext
Next Topic:Customizing Help Labels
Goto Forum:

Current Time: Tue Jan 28 23:55:03 GMT 2020

Powered by FUDForum. Page generated in 0.01637 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top