Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333398 - Cache for lists by EClass (MetaclassInstancesAdapter) : wrong computing
Summary: Cache for lists by EClass (MetaclassInstancesAdapter) : wrong computing
Status: NEW
Alias: None
Product: MoDisco
Classification: Modeling
Component: Infrastructure (show other bugs)
Version: 0.9.0   Edit
Hardware: PC Windows XP
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-03 03:09 EST by Fabien Giquel CLA
Modified: 2012-12-19 08:50 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabien Giquel CLA 2011-01-03 03:09:25 EST
Reusing MetaclassInstancesAdapter class in another context than MoDisco reveals some misc bug in computing list by Elass.
Such a bug should also occur in MoDisco (eg : with Model Browser which uses this cache).

The problem occurs when some Resource update events are taken in account in MetaclassInstancesAdapter.handleChanged(...).

The scenario is :
- having a Resource with many top level objects (in Resource.contents)
- moving one top level object to some EObject container
-> EMF sends two events = one "REMOVE" from notifier Resource + one "ADD" from notifier EObject container. The problem is that "REMOVE" comes after "ADD" and so MetaclassInstancesAdapter consider the top level object as lost.