| [CDO] Editing lazy loaded objects [message #905358] |
Thu, 30 August 2012 04:22  |
Eclipse User |
|
|
|
Hi,
I load a PART of one or more containment graphs. Then I want to edit the objects making use of EMFs mechanisms for undo/redo and maybe even using EditingDomains together with existing or custom editors.
Now all implementations of ChangeRecorders and EditingDomains that I have found uses Adapters inherited from EcontentAdapter to adapt the object graph. The self adapting process of EcontentAdapter reads the whole containment graph from the database. This is not doable for my models due to time and memory constraints.
I have been looking for examples of lazy loading editors but all I found, for instance CDO editors and DAWN, loads everything every time.
Where can I find an example of how to create a ChangeRecorder and an EditingDomain that uses lazy adating/loading?
I thought I would change the behavior of some EditingDomain and ChangeRecorder implementation to make it use CDOLazyContentAdapter instead. It turned out to be really hard. My first approach was to subclass stuff to achieve this, but I couldn't find a way to do that for any EditingDomain or ChangeRecorder due to the inheritance tree and private resources.
I needed to do some ugly hacking into (creating my own versions of) ChangeCommand, ChangeRecorder and BasicChangeRecorder in order to get undo/redo to work without loading unwanted objects. It works but is not a good solution since:
- I do not know the full consequences of the hacking I have done.
- It makes my code vulnerable to changes in the framework.
- I still haven't got a working EditingDomain with lazy adapting.
Has someone else done this?
Regards
///Anders
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05151 seconds