Skip to main content



      Home
Home » Modeling » EMF » TransactionChangeRecorder not added in my CDOObject adapters
TransactionChangeRecorder not added in my CDOObject adapters [message #1774515] Mon, 16 October 2017 11:45 Go to next message
Eclipse UserFriend
Hello,

I have an Eclipse RCP client wich use EMF/CDO with Sirius and a little CLI program which add some CDOObjects to my model. When this CLI program add a new object, it appears correctly in my diagram but I can't move it. I managed to find what's the problem: my CDOObject has no eAdapters, it should have at least the TransactionChangeRecorder from my TransactionalEditingDomainImpl so the recorder can return a correct ChangeDescription from its endRecording function at the end of an EMF commit transaction.
When I create an object from the palette, it's works fine.

Do you have any idea ?

Thank you.

Regards,
Arthur
Re: TransactionChangeRecorder not added in my CDOObject adapters [message #1774603 is a reply to message #1774515] Tue, 17 October 2017 13:06 Go to previous messageGo to next message
Eclipse UserFriend
Hi, Arthur,

The `TransactionChangeRecorder` should have discovered the new object automatically when it was added to its container, assuming that the container has it attached. If notification is disabled on that container when your object is added, then there's no way for anything, even this change recorder, to know about it. Is that what's happening?

I'd suggest debugging the addition of your object to its container to see what's going on there.

HTH,

Christian
Re: TransactionChangeRecorder not added in my CDOObject adapters [message #1774642 is a reply to message #1774603] Wed, 18 October 2017 05:10 Go to previous messageGo to next message
Eclipse UserFriend
No Message Body

[Updated on: Wed, 18 October 2017 06:04] by Moderator

Re: TransactionChangeRecorder not added in my CDOObject adapters [message #1774646 is a reply to message #1774642] Wed, 18 October 2017 06:04 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Maybe you should try to add an EContentAdapter on your container ?
Re: TransactionChangeRecorder not added in my CDOObject adapters [message #1774686 is a reply to message #1774515] Wed, 18 October 2017 11:41 Go to previous messageGo to next message
Eclipse UserFriend
Hi Christian,

Thank you for your response. My container has the TransactionChangeRecorder attached. However, I can't find where the new item is being added (I tried to add a breakpoint in AbstractEList.add and in CDOStoreImpl.add but it doesn't hit).
Moreover, I have absolutly no notification when the new object is added to the container on the container eAdapters (I added a breakpoint in TransactionChangeRecorder.notifyChanged).

Is it a bad configuration maybe ? I think about something from the CDOView's options (setLoadNotificationEnabled).


Regards,
Arthur
Re: TransactionChangeRecorder not added in my CDOObject adapters [message #1774699 is a reply to message #1774686] Wed, 18 October 2017 13:22 Go to previous message
Eclipse UserFriend
Hi, Arthur,

It can be difficult to pinpoint where exactly in what EList implementation an object is added to a list. It is easier when debugging a problem like this to add an override of the eBasicSetContainer(...) method in the XyzImpl class that you're attaching to the model and a breakpoint on the super(...) call. No matter what else happens, and CDO has some weird ways of materializing objects in a model out of the ether, the EMF run-time has to ensure that the object is assigned its container.

HTH,

Christian
Previous Topic:[CDO] Memory usage for complete model access
Next Topic:Documentation/specification/standard for the BInaryResource format?
Goto Forum:
  


Current Time: Wed Jul 23 22:32:28 EDT 2025

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

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

Back to the top