Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367905 - [CDO] Allow Adapters to be notified during loading
Summary: [CDO] Allow Adapters to be notified during loading
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.1   Edit
Hardware: PC Windows Vista
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-04 18:58 EST by Alexandre Borgoltz CLA
Modified: 2012-09-21 07:18 EDT (History)
1 user (show)

See Also:


Attachments
Patch - Failing Test case for Load notification API (150.95 KB, patch)
2012-01-26 14:20 EST, Alexandre Borgoltz CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Borgoltz CLA 2012-01-04 18:58:37 EST
As explained in http://www.eclipse.org/forums/index.php/m/774303/#msg_774303, it would be nice if CDO's behaviour regarding the notification of adapters during loading could be parametrized to be switched on, to mimic the behaviour of XMI resources for exemple.
Comment 1 Eike Stepper CLA 2012-01-05 04:32:39 EST
I'm adding the following new API:

- CDOView.Options.isLoadNotificationEnabled()
- CDOView.Options.setLoadNotificationEnabled(boolean)

The default value is false (i.e. the former behaviour)
Comment 2 Eike Stepper CLA 2012-01-05 04:33:20 EST
commit 7071cb1cd5f9a14529f3be4c8ad319848aa94715
Comment 3 Eike Stepper CLA 2012-01-05 04:35:02 EST
Please test carefully because we don't have tests for this in our suites (other than regression tests)!
Comment 4 Alexandre Borgoltz CLA 2012-01-26 14:20:32 EST
Created attachment 210149 [details]
Patch - Failing Test case for Load notification API

Here's the requested patch. 
It adds org.eclipse.emf.cdo.tests.LoadNotificationTest, that is failing, because constuctor-time-registered adapters are not notified.
Comment 5 Eike Stepper CLA 2012-04-05 08:22:40 EDT
Alexandre, I can't seem to apply your patch:

C:/Users/Stepper/AppData/Local/Temp/~attachment-5480502489365861950.patch:841: trailing whitespace.
 * 
C:/Users/Stepper/AppData/Local/Temp/~attachment-5480502489365861950.patch:872: trailing whitespace.
 * 
C:/Users/Stepper/AppData/Local/Temp/~attachment-5480502489365861950.patch:879: trailing whitespace.
   * 
C:/Users/Stepper/AppData/Local/Temp/~attachment-5480502489365861950.patch:887: trailing whitespace.
   * 
C:/Users/Stepper/AppData/Local/Temp/~attachment-5480502489365861950.patch:897: trailing whitespace.
   * 
error: patch failed: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/legacy/model6/Model6Factory.java:18
error: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/legacy/model6/Model6Factory.java: patch does not apply
error: patch failed: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/legacy/model6/Model6Package.java:23
error: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/legacy/model6/Model6Package.java: patch does not apply
error: patch failed: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/legacy/model6/impl/Model6FactoryImpl.java:20
error: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/legacy/model6/impl/Model6FactoryImpl.java: patch does not apply
error: patch failed: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/legacy/model6/impl/Model6PackageImpl.java:20
error: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/legacy/model6/impl/Model6PackageImpl.java: patch does not apply
error: patch failed: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/Model6Factory.java:15
error: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/Model6Factory.java: patch does not apply
error: patch failed: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/Model6Package.java:24
error: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/Model6Package.java: patch does not apply
error: patch failed: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/Model6FactoryImpl.java:18
error: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/Model6FactoryImpl.java: patch does not apply
error: patch failed: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/Model6PackageImpl.java:25
error: plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/Model6PackageImpl.java: patch does not apply

Nevertheless I've managed to modify model6.ecore and the generated GImpl classes:
commit 7005d35ba2bb85c295b2e25d1126e4a539f24036

Can you please attach your test case in plain Java format?
Comment 6 Eike Stepper CLA 2012-09-21 07:18:16 EDT
Closing.