Duplicate IDs in miscellaneous objects (Components / Ports / Specifications)
- Testing the implementation of #2309, the following example projects with duplicate IDs in Components / Ports / Specifications objects have been detected.
- It should be verified if there is an error with the corresponding unique ID assignment scheme
- Once the fix for #2309 has been committed, the duplicates can be easily fixed by loading the corresponding example and exporting it.
- Shell script to check for duplicate IDs:
for i in `find . -name "*.af3_23"`; do grep "id\=" $i | perl -pi -e "s/.*\s(id\=\"[0-9]+\").*$/\$1/g" | sort -n | uniq.exe -d && echo $i; done;
./plugins/org.fortiss.af3.mode/test-data/MotorManagement.af3_23
<containedElements xsi:type="org-fortiss-af3-component:Component" id="115" name="C1_Z1" comment="TODO">
<containedElements xsi:type="org-fortiss-af3-component:Component" id="95" name="Sub" comment="TODO">
<containedElements xsi:type="org-fortiss-af3-component:Component" id="99" name="Gain2" comment="TODO">
./plugins/org.fortiss.af3.table/test-data/TableUtilsTestProject.af3_23
<connectors xsi:type="org-fortiss-af3-component:InputPort" id="21" name="x" comment="">
<specifications xsi:type="org-fortiss-af3-component:CausalityComponentSpecification" id="21"/>
<connectors xsi:type="org-fortiss-af3-component:InputPort" id="29" name="defined" comment="">
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="29" name="k" comment="">
<specifications xsi:type="org-fortiss-af3-component:PortSpecification" id="30">
<containedElements xsi:type="org-fortiss-af3-component:Component" id="34" name="DoubleCondFunctionTableTestComponent" comment="">
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="34" name="Output" comment="">
<specifications xsi:type="org-fortiss-af3-component:CausalityComponentSpecification" id="35"/>
<specifications xsi:type="org-fortiss-af3-component:PortSpecification" id="35">
<specifications xsi:type="org-fortiss-af3-table:TableSpecification" id="38" name="Advanced Table Specification">
<connectors xsi:type="org-fortiss-af3-component:InputPort" id="38" name="add" comment="">
<specifications xsi:type="org-fortiss-af3-bounds:VariableBoundsSpecification" id="39" upperBound="254" lowerBound="-255"/>
<specifications xsi:type="org-fortiss-af3-component:PortSpecification" id="39">
<specifications xsi:type="org-fortiss-af3-bounds:VariableBoundsSpecification" id="40" upperBound="254" lowerBound="-255"/>
(from redmine: issue id 2316, created on 2015-03-16, closed on 2015-08-03)
- Relations:
- parent #2317 (closed)