Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 437646

Summary: Enhance AirDCrossReferenceAdapter installation
Product: [Modeling] Sirius Reporter: Esteban DUGUEPEROUX <esteban.dugueperoux>
Component: CoreAssignee: Esteban DUGUEPEROUX <esteban.dugueperoux>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 Keywords: triaged
Version: 1.0.0   
Target Milestone: 2.0.0   
Hardware: PC   
OS: Windows 8   
Whiteboard:
Bug Depends on:    
Bug Blocks: 443286    

Description Esteban DUGUEPEROUX CLA 2014-06-18 04:34:22 EDT
Currently we have AirDCrossReferenceAdapter, inheriting of the GMF CrossReferencerAdapter, installed only on .aird resource, aka AirdResource, through the AirdResourceFactory. Two issues with that :

1. When the AbstractCanonicalSynchronizer.deleteViews() calls  "ViewUtil.destroy(view);", sometimes it asks a GMF CrossReferencerAdapter on the ResourceSet. But as our AirDCrossReferenceAdapter is registered only on AirdResourceImpl a new GMF CrossReferencerAdapter is created and used
2. When another type of Resource is used for .aird resource like InMemoryResourceImpl for example, then no AirDCrossReferenceAdapter is installed on it.

To fix these 2 issues, we propose to add this AirDCrossReferenceAdapter installed on ResourceSet and be recursively added only on .aird resource by checking "new ResourceQuery().isRepresentationsResource()" condition.
This adapter will be removed on session close as it is currently done for the semantic cross referencer's session.
Comment 1 Esteban DUGUEPEROUX CLA 2014-06-18 04:51:46 EDT
https://git.eclipse.org/r/#/c/26677/ has been submited to Gerrit.
Comment 2 Esteban DUGUEPEROUX CLA 2014-06-23 11:15:28 EDT
using ResourceQuery.isRepresentationsResource(), we have found a bug in it when a representations resource contains more than one root EObject, this resource is not considered as representations resource.
Fixed.
Comment 3 Pierre-Charles David CLA 2014-10-27 06:52:32 EDT
Available in Sirius 2.0.0.