diff --git a/modeling/DIPLODOCUS/CloneCompositeComponentTest.xml b/modeling/DIPLODOCUS/CloneCompositeComponentTest.xml new file mode 100644 index 0000000000000000000000000000000000000000..a589cd04ec8c340b2c5318c4f941f20be826d3d2 --- /dev/null +++ b/modeling/DIPLODOCUS/CloneCompositeComponentTest.xml @@ -0,0 +1,444 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<TURTLEGMODELING version="1.0beta"> + +<Modeling type="TML Component Design" nameTab="DIPLODOCUS_C_Design" > +<TMLComponentTaskDiagramPanel name="TML Component Task Diagram" minX="10" maxX="2500" minY="10" maxY="1500" channels="true" events="true" requests="true" zoom="1.0" > +<CONNECTOR type="126" id="1" > +<cdparam x="878" y="469" /> +<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="449" y="413" id="18" /> +<P2 x="597" y="413" id="5" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="126" id="2" > +<cdparam x="1021" y="460" /> +<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="597" y="368" id="3" /> +<P2 x="449" y="368" id="16" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<COMPONENT type="1200" id="37" > +<cdparam x="208" y="148" /> +<sizeparam width="672" height="511" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Composite component" value="CompositeComponent" /> +<TGConnectingPoint num="0" id="29" /> +<TGConnectingPoint num="1" id="30" /> +<TGConnectingPoint num="2" id="31" /> +<TGConnectingPoint num="3" id="32" /> +<TGConnectingPoint num="4" id="33" /> +<TGConnectingPoint num="5" id="34" /> +<TGConnectingPoint num="6" id="35" /> +<TGConnectingPoint num="7" id="36" /> +<extraparam> +<info hiddeni="false" /> +</extraparam> +</COMPONENT> +<SUBCOMPONENT type="1202" id="15" > +<father id="37" num="0" /> +<cdparam x="610" y="320" /> +<sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="0" maxX="472" minY="0" maxY="361" /> +<infoparam name="Primitive component" value="PrimitiveComp2" /> +<TGConnectingPoint num="0" id="7" /> +<TGConnectingPoint num="1" id="8" /> +<TGConnectingPoint num="2" id="9" /> +<TGConnectingPoint num="3" id="10" /> +<TGConnectingPoint num="4" id="11" /> +<TGConnectingPoint num="5" id="12" /> +<TGConnectingPoint num="6" id="13" /> +<TGConnectingPoint num="7" id="14" /> +<extraparam> +<Data isAttacker="No" /> +</extraparam> +</SUBCOMPONENT> +<SUBCOMPONENT type="1203" id="4" > +<father id="15" num="0" /> +<cdparam x="597" y="355" /> +<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 channel" /> +<TGConnectingPoint num="0" id="3" /> +<extraparam> +<Prop commName="channel" 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="" /> +<Type type="0" typeOther="" /> +<Type type="0" typeOther="" /> +</extraparam> +</SUBCOMPONENT> +<SUBCOMPONENT type="1203" id="6" > +<father id="15" num="1" /> +<cdparam x="597" y="400" /> +<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="Event event" /> +<TGConnectingPoint num="0" id="5" /> +<extraparam> +<Prop commName="event" commType="1" 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="" /> +<Type type="0" typeOther="" /> +<Type type="0" typeOther="" /> +</extraparam> +</SUBCOMPONENT> +<SUBCOMPONENT type="1202" id="28" > +<father id="37" num="1" /> +<cdparam x="236" y="321" /> +<sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="0" maxX="472" minY="0" maxY="361" /> +<infoparam name="Primitive component" value="PrimitiveComp1" /> +<TGConnectingPoint num="0" id="20" /> +<TGConnectingPoint num="1" id="21" /> +<TGConnectingPoint num="2" id="22" /> +<TGConnectingPoint num="3" id="23" /> +<TGConnectingPoint num="4" id="24" /> +<TGConnectingPoint num="5" id="25" /> +<TGConnectingPoint num="6" id="26" /> +<TGConnectingPoint num="7" id="27" /> +<extraparam> +<Data isAttacker="No" /> +</extraparam> +</SUBCOMPONENT> +<SUBCOMPONENT type="1203" id="17" > +<father id="28" num="0" /> +<cdparam x="423" y="355" /> +<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 channel" /> +<TGConnectingPoint num="0" id="16" /> +<extraparam> +<Prop commName="channel" 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="" /> +<Type type="0" typeOther="" /> +<Type type="0" typeOther="" /> +</extraparam> +</SUBCOMPONENT> +<SUBCOMPONENT type="1203" id="19" > +<father id="28" num="1" /> +<cdparam x="423" y="400" /> +<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="Event event" /> +<TGConnectingPoint num="0" id="18" /> +<extraparam> +<Prop commName="event" commType="1" origin="true" finite="true" 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="" /> +<Type type="0" typeOther="" /> +<Type type="0" typeOther="" /> +</extraparam> +</SUBCOMPONENT> + + +</TMLComponentTaskDiagramPanel> + +<TMLActivityDiagramPanel name="PrimitiveComp1" minX="10" maxX="2500" minY="10" maxY="1500" > +<COMPONENT type="1001" id="150" > +<cdparam x="397" y="440" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<TGConnectingPoint num="0" id="149" /> +</COMPONENT> + +<COMPONENT type="1001" id="152" > +<cdparam x="302" y="444" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<TGConnectingPoint num="0" id="151" /> +</COMPONENT> + +<COMPONENT type="1008" id="155" > +<cdparam x="285" y="326" /> +<sizeparam width="55" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="send event" value="event()" /> +<TGConnectingPoint num="0" id="153" /> +<TGConnectingPoint num="1" id="154" /> +<extraparam> +<Data eventName="event" nbOfParams="5" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="1006" id="158" > +<cdparam x="368" y="324" /> +<sizeparam width="78" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="write channel" value="channel(1)" /> +<TGConnectingPoint num="0" id="156" /> +<TGConnectingPoint num="1" id="157" /> +<extraparam> +<Data channelName="channel" nbOfSamples="1" secPattern="" isAttacker="No" isEncForm="Yes" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="1012" id="166" > +<cdparam x="392" y="183" /> +<sizeparam width="30" height="30" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="choice" value="null" /> +<TGConnectingPoint num="0" id="162" /> +<TGConnectingPoint num="1" id="163" /> +<TGConnectingPoint num="2" id="164" /> +<TGConnectingPoint num="3" id="165" /> +</COMPONENT> +<SUBCOMPONENT type="-1" id="159" > +<father id="166" num="0" /> +<cdparam x="367" y="193" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> +<infoparam name="guard 1" value="[ ]" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="-1" id="160" > +<father id="166" num="1" /> +<cdparam x="427" y="193" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> +<infoparam name="guard 2" value="[ ]" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="-1" id="161" > +<father id="166" num="2" /> +<cdparam x="412" y="228" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> +<infoparam name="guard 3" value="[ ]" /> +</SUBCOMPONENT> + +<COMPONENT type="1000" id="168" > +<cdparam x="400" y="50" /> +<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="start state" value="null" /> +<TGConnectingPoint num="0" id="167" /> +</COMPONENT> + +<CONNECTOR type="115" id="170" > +<cdparam x="367" y="198" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<P1 x="367" y="198" id="163" /> +<P2 x="312" y="321" id="153" /> +<Point x="312" y="198" /> +<AutomaticDrawing data="true" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="169" > +<father id="170" num="0" /> +<cdparam x="312" y="198" /> +<sizeparam width="1" height="1" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="point " value="null" /> +</SUBCOMPONENT> + +<CONNECTOR type="115" id="171" > +<cdparam x="407" y="65" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<P1 x="407" y="65" id="167" /> +<P2 x="407" y="173" id="162" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="172" > +<cdparam x="407" y="238" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<P1 x="407" y="238" id="165" /> +<P2 x="407" y="319" id="156" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="173" > +<cdparam x="312" y="351" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<P1 x="312" y="351" id="154" /> +<P2 x="312" y="439" id="151" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="174" > +<cdparam x="407" y="349" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<P1 x="407" y="349" id="157" /> +<P2 x="407" y="435" id="149" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> + +</TMLActivityDiagramPanel> + +<TMLActivityDiagramPanel name="PrimitiveComp2" minX="10" maxX="2500" minY="10" maxY="1500" > +<COMPONENT type="1001" id="176" > +<cdparam x="520" y="416" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<TGConnectingPoint num="0" id="175" /> +</COMPONENT> + +<COMPONENT type="1001" id="178" > +<cdparam x="397" y="418" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<TGConnectingPoint num="0" id="177" /> +</COMPONENT> + +<COMPONENT type="1010" id="181" > +<cdparam x="501" y="302" /> +<sizeparam width="59" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="wait event" value="event() " /> +<TGConnectingPoint num="0" id="179" /> +<TGConnectingPoint num="1" id="180" /> +<extraparam> +<Data eventName="event" nbOfParams="5" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="1009" id="184" > +<cdparam x="366" y="296" /> +<sizeparam width="82" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="read channel" value="channel(1) " /> +<TGConnectingPoint num="0" id="182" /> +<TGConnectingPoint num="1" id="183" /> +<extraparam> +<Data channelName="channel" nbOfSamples="1" secPattern="" isAttacker="No" isEncForm="Yes" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="1012" id="192" > +<cdparam x="392" y="175" /> +<sizeparam width="30" height="30" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="choice" value="null" /> +<TGConnectingPoint num="0" id="188" /> +<TGConnectingPoint num="1" id="189" /> +<TGConnectingPoint num="2" id="190" /> +<TGConnectingPoint num="3" id="191" /> +</COMPONENT> +<SUBCOMPONENT type="-1" id="185" > +<father id="192" num="0" /> +<cdparam x="367" y="185" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> +<infoparam name="guard 1" value="[ ]" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="-1" id="186" > +<father id="192" num="1" /> +<cdparam x="427" y="185" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> +<infoparam name="guard 2" value="[ ]" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="-1" id="187" > +<father id="192" num="2" /> +<cdparam x="412" y="220" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> +<infoparam name="guard 3" value="[ ]" /> +</SUBCOMPONENT> + +<COMPONENT type="1000" id="194" > +<cdparam x="400" y="50" /> +<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="start state" value="null" /> +<TGConnectingPoint num="0" id="193" /> +</COMPONENT> + +<CONNECTOR type="115" id="196" > +<cdparam x="447" y="190" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<P1 x="447" y="190" id="190" /> +<P2 x="530" y="297" id="179" /> +<Point x="530" y="190" /> +<AutomaticDrawing data="true" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="195" > +<father id="196" num="0" /> +<cdparam x="530" y="190" /> +<sizeparam width="1" height="1" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="point " value="null" /> +</SUBCOMPONENT> + +<CONNECTOR type="115" id="197" > +<cdparam x="407" y="65" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<P1 x="407" y="65" id="193" /> +<P2 x="407" y="165" id="188" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="198" > +<cdparam x="407" y="230" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<P1 x="407" y="230" id="191" /> +<P2 x="407" y="291" id="182" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="199" > +<cdparam x="407" y="321" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<P1 x="407" y="321" id="183" /> +<P2 x="407" y="413" id="177" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="200" > +<cdparam x="530" y="327" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<P1 x="530" y="327" id="180" /> +<P2 x="530" y="411" id="175" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> + +</TMLActivityDiagramPanel> + +</Modeling> + + + + +</TURTLEGMODELING> \ No newline at end of file diff --git a/ttool/src/test/java/ui/TDiagramPanelCloneTest.java b/ttool/src/test/java/ui/TDiagramPanelCloneTest.java new file mode 100644 index 0000000000000000000000000000000000000000..d2dae0b5eb348f6c2da6c113a118523869173143 --- /dev/null +++ b/ttool/src/test/java/ui/TDiagramPanelCloneTest.java @@ -0,0 +1,69 @@ +package ui; + +import org.junit.*; +import tmltranslator.compareTMLTest.CompareTML; +import ui.tmlcompd.TMLCCompositeComponent; +import ui.tmlcompd.TMLComponentTaskDiagramPanel; + +import java.io.*; + +import static org.junit.Assert.*; +/* + * #issue 82 + * author : Minh Hiep + */ +public class TDiagramPanelCloneTest extends AbstractUITest { + + static TDiagramPanel diagramPanel; + static TGComponent tgComponent; + final static String PATH_TO_DIPLODOCUS = "../../modeling/DIPLODOCUS/"; + final static String ORIGIN_FILE_NAME = "CloneCompositeComponentTest"; + final static String GENERATED_FILE = "spec.tml"; + final static String EXPECTED_FILE = "test/resources/tmltranslator/expected/expected_spec.tml"; + + + @BeforeClass + public static void setUpBeforeClass() throws Exception { + RESOURCES_DIR = PATH_TO_DIPLODOCUS + ORIGIN_FILE_NAME + XML_EXT; + } + + public TDiagramPanelCloneTest() { + super(); + mainGUI.openProjectFromFile(new File(RESOURCES_DIR)); + } + + @Before + public void setUp() { + diagramPanel = null; + for(TURTLEPanel _tab : mainGUI.getTabs()) { + if(_tab instanceof TMLComponentDesignPanel) { + for (TDiagramPanel tdp : _tab.getPanels()) { + if (tdp instanceof TMLComponentTaskDiagramPanel) { + diagramPanel = tdp; + mainGUI.selectTab(tdp); + break; + } + } + break; + } + } + + //tgComponent = findDiagComponent(238, diagramPanel); + for (TGComponent tgc : diagramPanel.getComponentList()) { + if (tgc instanceof TMLCCompositeComponent) { + tgComponent = tgc; + } + } + } + + @Test + public void testCloneComponent() throws Exception{ + CompareTML compTML = new CompareTML(); + diagramPanel.cloneComponent(tgComponent); + mainGUI.modelChecking(); + mainGUI.generateTMLTxt(); + File f1 = new File(EXPECTED_FILE); + File f2 = new File(GENERATED_FILE); + assertTrue(compTML.compareTML(f1,f2)); + } +} \ No newline at end of file diff --git a/ttool/src/test/resources/tmltranslator/expected/expected_spec.tml b/ttool/src/test/resources/tmltranslator/expected/expected_spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..b9481b48d061c6f3c95cebf60f27f15dff381005 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/expected/expected_spec.tml @@ -0,0 +1,70 @@ +// TML Application - FORMAT 0.1 +// Application: /home/pham/Documents/TToolDev/TTool/modeling/DIPLODOCUS/CloneCompositeComponentTest.xml +// Generated: Fri Jan 25 12:05:27 CET 2019 + +// Channels +CHANNEL DIPLODOCUS_C_Design__channel BRBW 4 8 OUT DIPLODOCUS_C_Design__PrimitiveComp1 IN DIPLODOCUS_C_Design__PrimitiveComp2 +CHANNEL DIPLODOCUS_C_Design__channel_0 BRBW 4 8 OUT DIPLODOCUS_C_Design__PrimitiveComp1_0 IN DIPLODOCUS_C_Design__PrimitiveComp2_0 + +// Events +EVENT DIPLODOCUS_C_Design__event_0__DIPLODOCUS_C_Design__event_0() NIB 8 DIPLODOCUS_C_Design__PrimitiveComp1_0 DIPLODOCUS_C_Design__PrimitiveComp2_0 +EVENT DIPLODOCUS_C_Design__event__DIPLODOCUS_C_Design__event() NIB 8 DIPLODOCUS_C_Design__PrimitiveComp1 DIPLODOCUS_C_Design__PrimitiveComp2 + +// Requests + +TASK DIPLODOCUS_C_Design__PrimitiveComp1 + //Local variables + + //Behavior + RAND + CASERAND 50 + NOTIFY DIPLODOCUS_C_Design__event__DIPLODOCUS_C_Design__event + ENDCASERAND + CASERAND 50 + WRITE DIPLODOCUS_C_Design__channel 1 + ENDCASERAND + ENDRAND +ENDTASK + +TASK DIPLODOCUS_C_Design__PrimitiveComp1_0 + //Local variables + + //Behavior + RAND + CASERAND 50 + NOTIFY DIPLODOCUS_C_Design__event_0__DIPLODOCUS_C_Design__event_0 + ENDCASERAND + CASERAND 50 + WRITE DIPLODOCUS_C_Design__channel_0 1 + ENDCASERAND + ENDRAND +ENDTASK + +TASK DIPLODOCUS_C_Design__PrimitiveComp2 + //Local variables + + //Behavior + RAND + CASERAND 50 + WAIT DIPLODOCUS_C_Design__event__DIPLODOCUS_C_Design__event + ENDCASERAND + CASERAND 50 + READ DIPLODOCUS_C_Design__channel 1 + ENDCASERAND + ENDRAND +ENDTASK + +TASK DIPLODOCUS_C_Design__PrimitiveComp2_0 + //Local variables + + //Behavior + RAND + CASERAND 50 + WAIT DIPLODOCUS_C_Design__event_0__DIPLODOCUS_C_Design__event_0 + ENDCASERAND + CASERAND 50 + READ DIPLODOCUS_C_Design__channel_0 1 + ENDCASERAND + ENDRAND +ENDTASK +