diff --git a/modeling/DIPLODOCUS/ModelsForZ3Tests/Z3SimpleTestCase.xml b/modeling/DIPLODOCUS/ModelsForZ3Tests/Z3SimpleTestCase.xml index 14f30248318b315bbbd4dd22b30cd26b6a554531..cb6dd65120a02ac1657c5a53e494f42ef45b9c80 100644 --- a/modeling/DIPLODOCUS/ModelsForZ3Tests/Z3SimpleTestCase.xml +++ b/modeling/DIPLODOCUS/ModelsForZ3Tests/Z3SimpleTestCase.xml @@ -107,32 +107,32 @@ <cdparam x="869" y="173" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="850" y="193" id="64" /> -<P2 x="1068" y="295" id="40" /> +<P1 x="850" y="193" id="66" /> +<P2 x="1068" y="295" id="38" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="35" > <cdparam x="873" y="587" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="861" y="542" id="53" /> -<P2 x="1068" y="348" id="38" /> +<P1 x="861" y="542" id="51" /> +<P2 x="1068" y="348" id="40" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="36" > <cdparam x="412" y="359" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="399" y="346" id="79" /> -<P2 x="661" y="537" id="51" /> +<P1 x="399" y="346" id="77" /> +<P2 x="661" y="537" id="53" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="37" > <cdparam x="412" y="305" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="399" y="292" id="77" /> -<P2 x="650" y="190" id="66" /> +<P1 x="399" y="292" id="79" /> +<P2 x="650" y="190" id="64" /> <AutomaticDrawing data="true" /> </CONNECTOR> <COMPONENT type="1202" id="50" > @@ -155,14 +155,14 @@ </COMPONENT> <SUBCOMPONENT type="1203" id="39" > <father id="50" num="0" /> -<cdparam x="1055" y="348" /> +<cdparam x="1055" y="295" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" /> -<infoparam name="Primitive port" value="Channel DEin" /> +<infoparam name="Primitive port" value="Channel BEin" /> <TGConnectingPoint num="0" id="38" /> <extraparam> -<Prop commName="DEin" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="BEin" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -172,14 +172,14 @@ </SUBCOMPONENT> <SUBCOMPONENT type="1203" id="41" > <father id="50" num="1" /> -<cdparam x="1055" y="295" /> +<cdparam x="1055" y="348" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" /> -<infoparam name="Primitive port" value="Channel BEin" /> +<infoparam name="Primitive port" value="Channel DEin" /> <TGConnectingPoint num="0" id="40" /> <extraparam> -<Prop commName="BEin" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="DEin" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -208,14 +208,14 @@ </COMPONENT> <SUBCOMPONENT type="1203" id="52" > <father id="63" num="0" /> -<cdparam x="648" y="537" /> +<cdparam x="848" y="542" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" /> -<infoparam name="Primitive port" value="Channel ADin" /> +<infoparam name="Primitive port" value="Channel DEout" /> <TGConnectingPoint num="0" id="51" /> <extraparam> -<Prop commName="ADin" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="DEout" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -225,14 +225,14 @@ </SUBCOMPONENT> <SUBCOMPONENT type="1203" id="54" > <father id="63" num="1" /> -<cdparam x="848" y="542" /> +<cdparam x="648" y="537" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" /> -<infoparam name="Primitive port" value="Channel DEout" /> +<infoparam name="Primitive port" value="Channel ADin" /> <TGConnectingPoint num="0" id="53" /> <extraparam> -<Prop commName="DEout" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="ADin" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -261,14 +261,14 @@ </COMPONENT> <SUBCOMPONENT type="1203" id="65" > <father id="76" num="0" /> -<cdparam x="837" y="193" /> +<cdparam x="637" y="190" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" /> -<infoparam name="Primitive port" value="Channel BEout" /> +<infoparam name="Primitive port" value="Channel ABin" /> <TGConnectingPoint num="0" id="64" /> <extraparam> -<Prop commName="BEout" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="ABin" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -278,14 +278,14 @@ </SUBCOMPONENT> <SUBCOMPONENT type="1203" id="67" > <father id="76" num="1" /> -<cdparam x="637" y="190" /> +<cdparam x="837" y="193" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" /> -<infoparam name="Primitive port" value="Channel ABin" /> +<infoparam name="Primitive port" value="Channel BEout" /> <TGConnectingPoint num="0" id="66" /> <extraparam> -<Prop commName="ABin" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="BEout" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -314,14 +314,14 @@ </COMPONENT> <SUBCOMPONENT type="1203" id="78" > <father id="89" num="0" /> -<cdparam x="386" y="292" /> +<cdparam x="386" y="346" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" /> -<infoparam name="Primitive port" value="Channel ABout" /> +<infoparam name="Primitive port" value="Channel ADout" /> <TGConnectingPoint num="0" id="77" /> <extraparam> -<Prop commName="ABout" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="ADout" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -331,14 +331,14 @@ </SUBCOMPONENT> <SUBCOMPONENT type="1203" id="80" > <father id="89" num="1" /> -<cdparam x="386" y="346" /> +<cdparam x="386" y="292" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" /> -<infoparam name="Primitive port" value="Channel ADout" /> +<infoparam name="Primitive port" value="Channel ABout" /> <TGConnectingPoint num="0" id="79" /> <extraparam> -<Prop commName="ADout" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="ABout" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -2122,11 +2122,11 @@ </COMPONENT> <SUBCOMPONENT type="1101" id="896" > <father id="930" num="0" /> -<cdparam x="1387" y="305" /> -<sizeparam width="105" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1365" y="333" /> +<sizeparam width="107" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="53" minY="0" maxY="69" /> -<infoparam name="TGComponent" value="DEBA::taskE" /> +<cdrectangleparam minX="0" maxX="51" minY="0" maxY="69" /> +<infoparam name="TGComponent" value="DEBA::taskD" /> <TGConnectingPoint num="0" id="888" /> <TGConnectingPoint num="1" id="889" /> <TGConnectingPoint num="2" id="890" /> @@ -2136,16 +2136,16 @@ <TGConnectingPoint num="6" id="894" /> <TGConnectingPoint num="7" id="895" /> <extraparam> -<info value="DEBA::taskE" taskName="taskE" referenceTaskName="DEBA" priority="0" operationMEC="" fatherComponentMECType="0" /> +<info value="DEBA::taskD" taskName="taskD" referenceTaskName="DEBA" priority="0" operationMEC="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="905" > <father id="930" num="1" /> -<cdparam x="1365" y="333" /> -<sizeparam width="107" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1387" y="305" /> +<sizeparam width="105" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="51" minY="0" maxY="69" /> -<infoparam name="TGComponent" value="DEBA::taskD" /> +<cdrectangleparam minX="0" maxX="53" minY="0" maxY="69" /> +<infoparam name="TGComponent" value="DEBA::taskE" /> <TGConnectingPoint num="0" id="897" /> <TGConnectingPoint num="1" id="898" /> <TGConnectingPoint num="2" id="899" /> @@ -2155,7 +2155,7 @@ <TGConnectingPoint num="6" id="903" /> <TGConnectingPoint num="7" id="904" /> <extraparam> -<info value="DEBA::taskD" taskName="taskD" referenceTaskName="DEBA" priority="0" operationMEC="" fatherComponentMECType="0" /> +<info value="DEBA::taskE" taskName="taskE" referenceTaskName="DEBA" priority="0" operationMEC="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> @@ -3848,11 +3848,11 @@ </COMPONENT> <SUBCOMPONENT type="1101" id="1876" > <father id="1910" num="0" /> -<cdparam x="1140" y="145" /> +<cdparam x="1140" y="171" /> <sizeparam width="111" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="39" minY="0" maxY="60" /> -<infoparam name="TGComponent" value="DEBA::taskA" /> +<infoparam name="TGComponent" value="DEBA::taskB" /> <TGConnectingPoint num="0" id="1868" /> <TGConnectingPoint num="1" id="1869" /> <TGConnectingPoint num="2" id="1870" /> @@ -3862,16 +3862,16 @@ <TGConnectingPoint num="6" id="1874" /> <TGConnectingPoint num="7" id="1875" /> <extraparam> -<info value="DEBA::taskA" taskName="taskA" referenceTaskName="DEBA" priority="0" operationMEC="taskA" fatherComponentMECType="0" /> +<info value="DEBA::taskB" taskName="taskB" referenceTaskName="DEBA" priority="0" operationMEC="taskB" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="1885" > <father id="1910" num="1" /> -<cdparam x="1140" y="171" /> +<cdparam x="1140" y="145" /> <sizeparam width="111" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="39" minY="0" maxY="60" /> -<infoparam name="TGComponent" value="DEBA::taskB" /> +<infoparam name="TGComponent" value="DEBA::taskA" /> <TGConnectingPoint num="0" id="1877" /> <TGConnectingPoint num="1" id="1878" /> <TGConnectingPoint num="2" id="1879" /> @@ -3881,7 +3881,7 @@ <TGConnectingPoint num="6" id="1883" /> <TGConnectingPoint num="7" id="1884" /> <extraparam> -<info value="DEBA::taskB" taskName="taskB" referenceTaskName="DEBA" priority="0" operationMEC="taskB" fatherComponentMECType="0" /> +<info value="DEBA::taskA" taskName="taskA" referenceTaskName="DEBA" priority="0" operationMEC="taskA" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> diff --git a/src/main/java/ui/GTURTLEModeling.java b/src/main/java/ui/GTURTLEModeling.java index e4f5defd34d0225b817d5aceebb96749bd83c9ef..447af3532b6e57aacd6b5b523e2ca94da8f58745 100644 --- a/src/main/java/ui/GTURTLEModeling.java +++ b/src/main/java/ui/GTURTLEModeling.java @@ -1578,11 +1578,11 @@ public class GTURTLEModeling { node = nodes.get(i); task = tasks.get(i); if ((node != null) && (task != null)) { - if (!panel.addTaskToNode(node.getName(), task.getTaskName())) { - TraceManager.addDev("Could not add " + task.getTaskName() + " to " + node.getName()); + if (!panel.addTaskToNode(node.getName(), task.getName())) { + TraceManager.addDev("Could not add " + task.getName() + " to " + node.getName()); return false; } else { - TraceManager.addDev("Task " + task.getTaskName() + " was added to " + node.getName()); + TraceManager.addDev("Task " + task.getName() + " was added to " + node.getName()); } } } diff --git a/src/main/java/ui/tmldd/TMLArchiDiagramPanel.java b/src/main/java/ui/tmldd/TMLArchiDiagramPanel.java index dbfd3410e91ca61718a8329b41feb7442c21a819..3db00bf54e963c0a3c740ecea6316c03fc7bf451 100755 --- a/src/main/java/ui/tmldd/TMLArchiDiagramPanel.java +++ b/src/main/java/ui/tmldd/TMLArchiDiagramPanel.java @@ -489,8 +489,14 @@ public class TMLArchiDiagramPanel extends TDiagramPanel implements TDPWithAttrib } } + // Task name is build as diagram__taskname + public boolean addTaskToNode(String nodeName, String fullTaskName) { + if (fullTaskName.indexOf("__") == -1) { + return false; + } + String[] tasksID = fullTaskName.split("__"); + - public boolean addTaskToNode(String nodeName, String taskName) { int ID = 10; for(TGComponent tgc: componentList) { if (tgc instanceof TMLArchiNode) { @@ -500,7 +506,8 @@ public class TMLArchiDiagramPanel extends TDiagramPanel implements TDPWithAttrib TMLArchiArtifact arti = new TMLArchiArtifact(node.getX() + ID, node.getY() + ID, node.getCurrentMinX(), node.getCurrentMaxX(), node.getCurrentMinY(), node.getCurrentMaxY(), true, node, this); ID += 5; - arti.setTaskName(taskName); + arti.setReferenceTaskName(tasksID[0]); + arti.setTaskName(tasksID[1]); arti.makeFullValue(); node.addSwallowedTGComponent(arti, 5, 5); return true;