| Summary: | [Model Browser] : metaclasses cache issue with some model update events | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] MoDisco | Reporter: | Fabien Giquel <fabien.giquel> | ||||||||
| Component: | Infrastructure | Assignee: | Fabien Giquel <fabien.giquel> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | hugo.bruneliere, modisco.web-inbox | ||||||||
| Version: | 0.9.0 | Flags: | fabien.giquel:
indigo+
|
||||||||
| Target Milestone: | 0.9.0 M6 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
The problem is in MetaclassInstancesAdapter.handleChanged() method. The old TemplateSignature is not removed from the Maps. Calling "setOwnedTemplateSignature" produces 3 events : - SET from old TS to null (reference template "container") - SET from model to newTS (reference ownedTemplateSignature "containment") - SET from newTS to model (reference template "container") There is no event "SET from model to null" which would remove old TS from cache. Created attachment 188777 [details]
Proposed MetaclassInstancesAdapter patch
Nicolas, could you have a look on the proposed patch ? I also fix another problem : the management of EObject which is moved from Resource.contents to another EObject.
Nicolas Bros, could you have a look on the proposed patch ? I also fix another problem : the management of EObject which is moved from Resource.contents to another EObject. Created attachment 188780 [details]
Proposed MetaclassInstancesAdapter patch
last patch was not based on last revision.
Comment on attachment 188780 [details]
Proposed MetaclassInstancesAdapter patch
I have reviewed your patch, and it looks OK. You can commit it.
The fix has been commited into SVN (rev 3905) with its associated junit test. Bug solved. |
Created attachment 188748 [details] Simple model for getting the issue Here is one issue in updating metaclasses instances number (left panel of model browser) when one model is updated. Opening the attached uml model : leftPanel displays TemplateSignature(1). Then, in executing following update on the model : TemplateSignature newTS = UMLFactory.INSTANCE.createTemplateSignature(); model.setOwnedTemplateSignature(newTS); Then, the old TemplateSignature does not below to the model anymore. But leftPanel will display TemplateSignature(2).