|
|
Re: Sirius Resource Strategy and Resource.unload() [message #1744494 is a reply to message #1744486] |
Tue, 27 September 2016 12:37 |
|
Hi Felix,
clicking on the "way faster" in the blog post will bring you to https://bugs.eclipse.org/bugs/show_bug.cgi?id=442133 which is linked to the corresponding commit.
Indeed there is an extension point which can be used to override this (resourceStrategy in org.eclipse.sirius).
Just to add a bit more background regarding your last comment Resource.close() does not exists, users tend to think Resource.unload() clear the memory whereas it is not, it turns every object into a proxy (leading to a huge increase of memory usage) and is not clearing anything. "unload" will happens right before a "load" when a file change on the filesystem for instance. If you want to detect the session closing to, for instance, clear a empty a view or clear your own data then better use a SessionListener which will get notified when the session is CLOSING and CLOSED
If, finally, you decide to implement the org.eclipse.sirius.resourceStrategy extention point, you can use the DefaultResourceStrategyImpl class that do what was done before. Note that this extention point is internal as we would like to have some distance before set it as api.
Regards
Laurent
Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.03817 seconds