-
- Downloads
Problem description:
- By default, EMF uses fragment-path based links to persist EReferences. While this works fine for standalone model resources, it can cause inconsistencies in case there are multiple resource models that contain cross-resource references. (I.e., if the structure of the AF3 model resource changes, the links from the external model resource can become invalid) - The recommended way to work around this is to configure EMF to use IDs to encode EReferences. Solution: - Change persistence of AF3 model resources to encode references using an (extrinsic) xmi:id, that is identical to the model element's org.fortiss.tooling.kernel.model.IIdLabled.id. A dedicated XMIResource type for AF3 model resources is used (which is created by a resource factory registered for *.af3_23 files) - The reason for not using IIdLabled.id as intrinsic ID is that the implemented solution using xmi:id is both forward and backward compatible - At the price of losing forward compatibility, the IIdLabled.id could be changed to a derived, volatile EAttribute that simply returns the value of xmi:id - Add EContentAdapter to sync xmi:id and IIdLabled.id - Ensure uniqueness of IDs (that is now much more crucial) during when loading and saving as well as importing and exporting models (and print a warning to the console in case duplicates have been detected and fixed) - As an additional safety layer, add constraint checkers to ensure uniqueness of IDs and consistency of IIdLabled.id and xmi:id Related changes: - Speed up loading and saving of XMI resources by setting corresponding XMLResource options - Ensure that IDs are assigned to annotations as soon as they are instantiated refs 2309
Showing
- org.fortiss.tooling.kernel/trunk/plugin.xml 15 additions, 0 deletionsorg.fortiss.tooling.kernel/trunk/plugin.xml
- org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/constraint/ConstraintMessage.java 75 additions, 0 deletions.../fortiss/tooling/kernel/constraint/ConstraintMessage.java
- org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/constraint/IdConsistencyChecker.java 71 additions, 0 deletions...rtiss/tooling/kernel/constraint/IdConsistencyChecker.java
- org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/constraint/IdConsistencyConstraintViolation.java 41 additions, 0 deletions...g/kernel/constraint/IdConsistencyConstraintViolation.java
- org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/constraint/IdUniquenessChecker.java 100 additions, 0 deletions...ortiss/tooling/kernel/constraint/IdUniquenessChecker.java
- org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/constraint/IdUniquenessConstraintViolation.java 41 additions, 0 deletions...ng/kernel/constraint/IdUniquenessConstraintViolation.java
- org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/constraint/package.html 8 additions, 0 deletions...nk/src/org/fortiss/tooling/kernel/constraint/package.html
- org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/data/ITopLevelElement.java 9 additions, 1 deletion...rtiss/tooling/kernel/extension/data/ITopLevelElement.java
- org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/DummyTopLevelElement.java 7 additions, 1 deletion...fortiss/tooling/kernel/internal/DummyTopLevelElement.java
- org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ElementCompositorService.java 8 additions, 2 deletions...iss/tooling/kernel/internal/ElementCompositorService.java
- org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/AF3ResourceFactory.java 151 additions, 0 deletions...g/kernel/internal/storage/eclipse/AF3ResourceFactory.java
- org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/ModelContext.java 79 additions, 5 deletions...tooling/kernel/internal/storage/eclipse/ModelContext.java
- org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/EMFResourceUtils.java 6 additions, 1 deletion...rc/org/fortiss/tooling/kernel/utils/EMFResourceUtils.java
- org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/UniqueIDUtils.java 32 additions, 1 deletion...k/src/org/fortiss/tooling/kernel/utils/UniqueIDUtils.java
Loading
Please register or sign in to comment