Community
Participate
Working Groups
This case is not managed by Sirius. Validation rules exist to avoid it. But if we don't validate the VSM we can have this problem. One of the problem is that the VSM becomes unusable (no way to open it with VSM editor). Steps to reproduce: * Create a new VSM * Create a new Viepoint * Create a new Cross Table Description * Create a new Tree Description * Create a new Tree Item (in the Tree Description). * Create a new Direct Edit tool uner the Tree Item * Save * KO: A warning is logged in the Error Log view: "The viewpoint registry was not able to load this file test.odesign" * Close the VSM editor * Open the VSM (with the VSM editor) * KO (same underlying problem: "java.lang.IllegalArgumentException: The feature 'subItemMappings' is not a valid reference") The problem is because the 2 representation descriptions have the same id (here a blank id). And there are URI ref that are wrong. One in this sample, the "mapping" reference for direct edit tool: <?xml version="1.0" encoding="UTF-8"?> <description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/table/description/1.1.0" xmlns:description_2="http://www.eclipse.org/sirius/tree/description/1.0.0" name="test" version="12.0.0.2017041100"> <ownedViewpoints> <ownedRepresentations xsi:type="description_1:CrossTableDescription"/> <ownedRepresentations xsi:type="description_2:TreeDescription"> <subItemMappings semanticCandidatesExpression="feature:eAllContents"> <defaultStyle> <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/> </defaultStyle> <directEdit mapping="//@ownedViewpoints[name='']/@ownedRepresentations[name='']/@subItemMappings[name='']"> <mask mask="{0}"/> <element name="element"/> <root name="root"/> </directEdit> </subItemMappings> </ownedRepresentations> </ownedViewpoints> </description:Group>