Filter EObject-Tree shown in aird Editor [message #1804404] |
Mon, 25 March 2019 10:32  |
Eclipse User |
|
|
|
Hi,
I have a large XText-Model that consists of several, cross-linked files. Loading all of them into an aird-file takes a long time and result in crashes, as too many GUID objects are created (I assume for the tree control).
I would like to tackle this problem with 2 ideas:
1. I would like to restrict the kind of EObjects are shown in the tree view and only show the "top-level" EObjects (it's just one per file) and omit its children.
2. I would like to restrict which resources are loaded into an aird-file when an EObject is added. Currently, almost the whole model is loaded. I would rather work with mutliple, smaller aird-files (and thus sessions) which are only created when they are really needed. Each aird-File should contain only a subset of the whole model.
My questions are as follows:
Regarding 1.: Is it correct, that I could achieve something like this (i.e., restricting the kind of EObjects shown in the aird-File by extension the Common Navigator Framework (CNF) extension point? If not, what would be the best approach to achive my goal?
Regarding 2.: How can I achieve to load not all referenced Resources when adding an EObject to a session? My idea was to overwrite DAnalysisSessionImpl.collectAllReferencedResources and filter the returned resources. Is this the right idea or is there a better way?
Thanks!
|
|
|
|
Re: Filter EObject-Tree shown in aird Editor [message #1804406 is a reply to message #1804405] |
Mon, 25 March 2019 11:27   |
Eclipse User |
|
|
|
Hi Maxime,
thanks for your reply, I did not realize you answered to my other question.
Regarding 1: Thanks for that advice, I will look into both options.
Regarding 2: I've looked into all of these resources before, although I did not study the examples provided by Cedric in greater detail (FowlerDsl, etc.) I will do this as a next step.
- However, most reasons seem to be related to the problem of enabling the user to modify the same model by XText and Sirius - in my case I only want the user to modify the model through XText. This should simplify the issue, as the Sirius model can never be dirty, should it not?
- Furthermore, if Entity A references a Library Function L but not Entity B, while B references L as well, there is a transitive relation between A and B, but I would not want to load B automatically when I load A. Imagine L is Type "String": I would not want to automatically load all other Strings into the model, just because A is a String, right? What would be the correct way to achieve this behavior, if the mentioned collectAllReferencedResource is not the right way? My Idea was to stop the transitive cross-reference-resolution at library types, e.g., at the mentioned String-Resource.
Thank you very much for your help, I was beginning to think I am alone on this. :-)
Konrad
|
|
|
Re: Filter EObject-Tree shown in aird Editor [message #1804595 is a reply to message #1804406] |
Fri, 29 March 2019 03:46  |
Eclipse User |
|
|
|
Wuick Follow-up question regarding Topic 1):
How can I prevent EObjects from being shown in the aird-Editor / Model Explorer? The sirius UI plugin does not seem to provide an extension point for doing so, and I think the CNF only allows me to add content to those views. Temporarily, I was able to prevent all EObject-Items from being generated in those views by simply using the already provided filters, but however I now do not have any Entries shown in those views...
The group feature unfortunately did not help to resolve my issue either, as the group's child elements still seemed to be created in an eager fashion.
|
|
|
Powered by
FUDForum. Page generated in 0.03755 seconds