Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » TransactionChangeRecorder not added in my CDOObject adapters
TransactionChangeRecorder not added in my CDOObject adapters [message #1774515] Mon, 16 October 2017 15:45 Go to next message
Arthur Qicapous is currently offline Arthur QicapousFriend
Messages: 6
Registered: October 2017
Junior Member
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 17:06 Go to previous messageGo to next message
Christian W. Damus is currently offline Christian W. DamusFriend
Messages: 1176
Registered: July 2009
Location: Canada
Senior Member

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 09:10 Go to previous messageGo to next message
Bastien BARET is currently offline Bastien BARETFriend
Messages: 12
Registered: February 2017
Junior Member
No Message Body

[Updated on: Wed, 18 October 2017 10:04]

Report message to a moderator

Re: TransactionChangeRecorder not added in my CDOObject adapters [message #1774646 is a reply to message #1774642] Wed, 18 October 2017 10:04 Go to previous messageGo to next message
Bastien BARET is currently offline Bastien BARETFriend
Messages: 12
Registered: February 2017
Junior Member
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 15:41 Go to previous messageGo to next message
Arthur Qicapous is currently offline Arthur QicapousFriend
Messages: 6
Registered: October 2017
Junior Member
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 17:22 Go to previous message
Christian W. Damus is currently offline Christian W. DamusFriend
Messages: 1176
Registered: July 2009
Location: Canada
Senior Member

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: Mon Nov 19 09:25:35 GMT 2018

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

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

Back to the top