From 1ad4cca6c29ec89de3090fdbe08abde9f878f23d Mon Sep 17 00:00:00 2001 From: Ludovic Apvrille <ludovic.apvrille@telecom-paristech.fr> Date: Wed, 27 Jan 2016 15:12:20 +0000 Subject: [PATCH] Adding sysmlsec methodology: pure draft, not yet real --- Makefile | 2 +- .../assumptions-drone/mad-drone-03bis.xml | 894 +++++++++--------- src/ui/GTURTLEModeling.java | 104 +- src/ui/JMenuBarTurtle.java | 461 +++++---- src/ui/MainGUI.java | 50 +- src/ui/SysmlsecMethodologyPanel.java | 229 +++++ src/ui/TDiagramPanel.java | 106 +-- src/ui/TGComponentManager.java | 60 +- .../SysmlsecMethodologyConnectingPoint.java | 71 ++ .../SysmlsecMethodologyConnector.java | 88 ++ .../SysmlsecMethodologyDiagramName.java | 316 +++++++ .../SysmlsecMethodologyDiagramPanel.java | 134 +++ .../SysmlsecMethodologyDiagramReference.java | 554 +++++++++++ .../SysmlsecMethodologyDiagramToolbar.java | 104 ++ ...ysmlsecMethodologyReferenceToAnalysis.java | 103 ++ ...lsecMethodologyReferenceToAssumptions.java | 99 ++ .../SysmlsecMethodologyReferenceToDesign.java | 147 +++ ...mlsecMethodologyReferenceToProperties.java | 99 ++ ...smlsecMethodologyReferenceToPrototype.java | 114 +++ ...lsecMethodologyReferenceToRequirement.java | 101 ++ src/ui/tree/DiagramTreeRenderer.java | 149 +-- 21 files changed, 3176 insertions(+), 809 deletions(-) create mode 100755 src/ui/SysmlsecMethodologyPanel.java create mode 100755 src/ui/sysmlsecmethodology/SysmlsecMethodologyConnectingPoint.java create mode 100755 src/ui/sysmlsecmethodology/SysmlsecMethodologyConnector.java create mode 100755 src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramName.java create mode 100755 src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramPanel.java create mode 100755 src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramReference.java create mode 100755 src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramToolbar.java create mode 100755 src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToAnalysis.java create mode 100755 src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToAssumptions.java create mode 100755 src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToDesign.java create mode 100755 src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToProperties.java create mode 100755 src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToPrototype.java create mode 100755 src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToRequirement.java diff --git a/Makefile b/Makefile index 15104fceaa..f60359ffc6 100755 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ GZIP = gzip -9 -f DEBUG = -g CLASSPATH = -classpath SOURCEPATH = -sourcepath -#PACKAGE = avatartranslator avatartranslator/toexecutable avatartranslator/directsimulation avatartranslator/tocppsim avatartranslator/touppaal avatartranslator/toturtle avatartranslator/toproverif avatartranslator/totpn automata compiler/tmlparser vcd nc ddtranslator launcher myutil tpndescription sddescription sdtranslator tepe translator tmltranslator tmltranslator/tmlcp tmltranslator/toautomata tmltranslator/tosystemc tmltranslator/tomappingsystemc tmltranslator/tomappingsystemc2 tmltranslator/touppaal tmltranslator/toturtle translator/tojava translator/tosimujava translator/totpn translator/touppaal ui ui/avatarbd ui/avatardd ui/avatarsmd ui/avatarrd ui/avatarpd ui/avatarcd ui/avatarad ui/ad ui/cd ui/oscd ui/osad ui/dd ui/ebrdd ui/file ui/graph ui/iod ui/ncdd ui/procsd ui/prosmdui/prosmd/util ui/tmlad ui/tmlcd ui/tmldd ui/tmlcomp ui/req ui/sd ui/tree ui/ucd ui/window tmltranslator tmltranslator/toturtle req/ebrdd tmltranslator/tosystemc tmatrix proverifspec uppaaldesc fr/inria/oasis/vercors/cttool/model remotesimulation tmltranslator/ctranslator attacktrees myutil/externalSearch +#PACKAGE = avatartranslator avatartranslator/toexecutable avatartranslator/directsimulation avatartranslator/tocppsim avatartranslator/touppaal avatartranslator/toturtle avatartranslator/toproverif avatartranslator/totpn automata compiler/tmlparser vcd nc ddtranslator launcher myutil tpndescription sddescription sdtranslator tepe translator tmltranslator tmltranslator/tmlcp tmltranslator/toautomata tmltranslator/tosystemc tmltranslator/tomappingsystemc tmltranslator/tomappingsystemc2 tmltranslator/touppaal tmltranslator/toturtle translator/tojava translator/tosimujava translator/totpn translator/touppaal ui ui/avatarbd ui/avatardd ui/avatarsmd ui/avatarrd ui/avatarpd ui/avatarcd ui/avatarad ui/ad ui/cd ui/oscd ui/osad ui/dd ui/ebrdd ui/file ui/graph ui/iod ui/ncdd ui/procsd ui/prosmdui/prosmd/util ui/tmlad ui/tmlcd ui/tmldd ui/tmlcomp ui/req ui/sd ui/tree ui/ucd ui/window ui/avatarmethodology ui/sysmlsecmethodology tmltranslator tmltranslator/toturtle req/ebrdd tmltranslator/tosystemc tmatrix proverifspec uppaaldesc fr/inria/oasis/vercors/cttool/model remotesimulation tmltranslator/ctranslator attacktrees myutil/externalSearch BUILDER = builder.jar BUILD_INFO = build.txt BUILD_TO_MODIFY = src/ui/DefaultText.java diff --git a/modeling/assumptions-drone/mad-drone-03bis.xml b/modeling/assumptions-drone/mad-drone-03bis.xml index 2ef9d59562..0a8298e5fe 100644 --- a/modeling/assumptions-drone/mad-drone-03bis.xml +++ b/modeling/assumptions-drone/mad-drone-03bis.xml @@ -3,6 +3,272 @@ <TURTLEGMODELING version="0.98-beta3"> <Modeling type="Avatar MAD" nameTab="MADs" > +<AvatarMADPanel name="Modeling Assumptions Diagram 1" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0" > +<COMPONENT type="5251" id="318" > +<cdparam x="357" y="193" /> +<sizeparam width="244" height="30" minWidth="10" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="105" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="AvatarDiagramReference" value="DroneDesign1" /> +<TGConnectingPoint num="0" id="291" /> +<TGConnectingPoint num="1" id="292" /> +<TGConnectingPoint num="2" id="293" /> +<TGConnectingPoint num="3" id="294" /> +<TGConnectingPoint num="4" id="295" /> +<TGConnectingPoint num="5" id="296" /> +<TGConnectingPoint num="6" id="297" /> +<TGConnectingPoint num="7" id="298" /> +<TGConnectingPoint num="8" id="299" /> +<TGConnectingPoint num="9" id="300" /> +<TGConnectingPoint num="10" id="301" /> +<TGConnectingPoint num="11" id="302" /> +<TGConnectingPoint num="12" id="303" /> +<TGConnectingPoint num="13" id="304" /> +<TGConnectingPoint num="14" id="305" /> +<TGConnectingPoint num="15" id="306" /> +<TGConnectingPoint num="16" id="307" /> +<TGConnectingPoint num="17" id="308" /> +<TGConnectingPoint num="18" id="309" /> +<TGConnectingPoint num="19" id="310" /> +<TGConnectingPoint num="20" id="311" /> +<TGConnectingPoint num="21" id="312" /> +<TGConnectingPoint num="22" id="313" /> +<TGConnectingPoint num="23" id="314" /> +<TGConnectingPoint num="24" id="315" /> +<TGConnectingPoint num="25" id="316" /> +<TGConnectingPoint num="26" id="317" /> +</COMPONENT> + +<COMPONENT type="5252" id="346" > +<cdparam x="368" y="271" /> +<sizeparam width="271" height="41" minWidth="10" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="203" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="AvatarElementReference" value="Block_LineRecognitionAlgorithm" /> +<TGConnectingPoint num="0" id="319" /> +<TGConnectingPoint num="1" id="320" /> +<TGConnectingPoint num="2" id="321" /> +<TGConnectingPoint num="3" id="322" /> +<TGConnectingPoint num="4" id="323" /> +<TGConnectingPoint num="5" id="324" /> +<TGConnectingPoint num="6" id="325" /> +<TGConnectingPoint num="7" id="326" /> +<TGConnectingPoint num="8" id="327" /> +<TGConnectingPoint num="9" id="328" /> +<TGConnectingPoint num="10" id="329" /> +<TGConnectingPoint num="11" id="330" /> +<TGConnectingPoint num="12" id="331" /> +<TGConnectingPoint num="13" id="332" /> +<TGConnectingPoint num="14" id="333" /> +<TGConnectingPoint num="15" id="334" /> +<TGConnectingPoint num="16" id="335" /> +<TGConnectingPoint num="17" id="336" /> +<TGConnectingPoint num="18" id="337" /> +<TGConnectingPoint num="19" id="338" /> +<TGConnectingPoint num="20" id="339" /> +<TGConnectingPoint num="21" id="340" /> +<TGConnectingPoint num="22" id="341" /> +<TGConnectingPoint num="23" id="342" /> +<TGConnectingPoint num="24" id="343" /> +<TGConnectingPoint num="25" id="344" /> +<TGConnectingPoint num="26" id="345" /> +</COMPONENT> + +<COMPONENT type="5250" id="378" > +<cdparam x="353" y="33" /> +<sizeparam width="259" height="119" minWidth="1" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="101" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Assumption" value="CrossingSigns" /> +<TGConnectingPoint num="0" id="347" /> +<TGConnectingPoint num="1" id="348" /> +<TGConnectingPoint num="2" id="349" /> +<TGConnectingPoint num="3" id="350" /> +<TGConnectingPoint num="4" id="351" /> +<TGConnectingPoint num="5" id="352" /> +<TGConnectingPoint num="6" id="353" /> +<TGConnectingPoint num="7" id="354" /> +<TGConnectingPoint num="8" id="355" /> +<TGConnectingPoint num="9" id="356" /> +<TGConnectingPoint num="10" id="357" /> +<TGConnectingPoint num="11" id="358" /> +<TGConnectingPoint num="12" id="359" /> +<TGConnectingPoint num="13" id="360" /> +<TGConnectingPoint num="14" id="361" /> +<TGConnectingPoint num="15" id="362" /> +<TGConnectingPoint num="16" id="363" /> +<TGConnectingPoint num="17" id="364" /> +<TGConnectingPoint num="18" id="365" /> +<TGConnectingPoint num="19" id="366" /> +<TGConnectingPoint num="20" id="367" /> +<TGConnectingPoint num="21" id="368" /> +<TGConnectingPoint num="22" id="369" /> +<TGConnectingPoint num="23" id="370" /> +<TGConnectingPoint num="24" id="371" /> +<TGConnectingPoint num="25" id="372" /> +<TGConnectingPoint num="26" id="373" /> +<TGConnectingPoint num="27" id="374" /> +<TGConnectingPoint num="28" id="375" /> +<TGConnectingPoint num="29" id="376" /> +<TGConnectingPoint num="30" id="377" /> +<extraparam> +<textline data="The drone is informed " /> +<textline data="about the crossing" /> +<textline data="identified with a sign" /> +<type data="0" /> +<durability data="1" /> +<source data="3" /> +<status data="1" /> +<limitation data="3" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="5250" id="410" > +<cdparam x="73" y="181" /> +<sizeparam width="183" height="139" minWidth="1" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="69" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Assumption" value="RedLine" /> +<TGConnectingPoint num="0" id="379" /> +<TGConnectingPoint num="1" id="380" /> +<TGConnectingPoint num="2" id="381" /> +<TGConnectingPoint num="3" id="382" /> +<TGConnectingPoint num="4" id="383" /> +<TGConnectingPoint num="5" id="384" /> +<TGConnectingPoint num="6" id="385" /> +<TGConnectingPoint num="7" id="386" /> +<TGConnectingPoint num="8" id="387" /> +<TGConnectingPoint num="9" id="388" /> +<TGConnectingPoint num="10" id="389" /> +<TGConnectingPoint num="11" id="390" /> +<TGConnectingPoint num="12" id="391" /> +<TGConnectingPoint num="13" id="392" /> +<TGConnectingPoint num="14" id="393" /> +<TGConnectingPoint num="15" id="394" /> +<TGConnectingPoint num="16" id="395" /> +<TGConnectingPoint num="17" id="396" /> +<TGConnectingPoint num="18" id="397" /> +<TGConnectingPoint num="19" id="398" /> +<TGConnectingPoint num="20" id="399" /> +<TGConnectingPoint num="21" id="400" /> +<TGConnectingPoint num="22" id="401" /> +<TGConnectingPoint num="23" id="402" /> +<TGConnectingPoint num="24" id="403" /> +<TGConnectingPoint num="25" id="404" /> +<TGConnectingPoint num="26" id="405" /> +<TGConnectingPoint num="27" id="406" /> +<TGConnectingPoint num="28" id="407" /> +<TGConnectingPoint num="29" id="408" /> +<TGConnectingPoint num="30" id="409" /> +<extraparam> +<textline data="A reline is assumed " /> +<textline data="to be paintd/sticked " /> +<textline data="on the floor in order " /> +<textline data="to guide the drone." /> +<type data="0" /> +<durability data="2" /> +<source data="3" /> +<status data="1" /> +<limitation data="3" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="5250" id="442" > +<cdparam x="64" y="37" /> +<sizeparam width="200" height="111" minWidth="1" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="117" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Assumption" value="SignsToNavigate" /> +<TGConnectingPoint num="0" id="411" /> +<TGConnectingPoint num="1" id="412" /> +<TGConnectingPoint num="2" id="413" /> +<TGConnectingPoint num="3" id="414" /> +<TGConnectingPoint num="4" id="415" /> +<TGConnectingPoint num="5" id="416" /> +<TGConnectingPoint num="6" id="417" /> +<TGConnectingPoint num="7" id="418" /> +<TGConnectingPoint num="8" id="419" /> +<TGConnectingPoint num="9" id="420" /> +<TGConnectingPoint num="10" id="421" /> +<TGConnectingPoint num="11" id="422" /> +<TGConnectingPoint num="12" id="423" /> +<TGConnectingPoint num="13" id="424" /> +<TGConnectingPoint num="14" id="425" /> +<TGConnectingPoint num="15" id="426" /> +<TGConnectingPoint num="16" id="427" /> +<TGConnectingPoint num="17" id="428" /> +<TGConnectingPoint num="18" id="429" /> +<TGConnectingPoint num="19" id="430" /> +<TGConnectingPoint num="20" id="431" /> +<TGConnectingPoint num="21" id="432" /> +<TGConnectingPoint num="22" id="433" /> +<TGConnectingPoint num="23" id="434" /> +<TGConnectingPoint num="24" id="435" /> +<TGConnectingPoint num="25" id="436" /> +<TGConnectingPoint num="26" id="437" /> +<TGConnectingPoint num="27" id="438" /> +<TGConnectingPoint num="28" id="439" /> +<TGConnectingPoint num="29" id="440" /> +<TGConnectingPoint num="30" id="441" /> +<extraparam> +<textline data="Assumption description:" /> +<textline data="Double-click to edit" /> +<type data="0" /> +<durability data="1" /> +<source data="2" /> +<status data="1" /> +<limitation data="0" /> +</extraparam> +</COMPONENT> + +<CONNECTOR type="5257" id="444" > +<cdparam x="480" y="283" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="{info}" /> +<TGConnectingPoint num="0" id="443" /> +<P1 x="503" y="271" id="326" /> +<P2 x="479" y="223" id="301" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="5255" id="446" > +<cdparam x="256" y="263" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="<<impact>>" /> +<TGConnectingPoint num="0" id="445" /> +<P1 x="256" y="215" id="394" /> +<P2 x="357" y="215" id="293" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="5253" id="448" > +<cdparam x="354" y="101" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from Assumption to Assumption" value="<<composition>>" /> +<TGConnectingPoint num="0" id="447" /> +<P1 x="353" y="92" id="348" /> +<P2 x="264" y="92" id="415" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="5255" id="450" > +<cdparam x="480" y="237" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from AvatarDiagramReference to AvatarElementReference" value="<<impact>>" /> +<TGConnectingPoint num="0" id="449" /> +<P1 x="256" y="285" id="396" /> +<P2 x="368" y="291" id="320" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="5253" id="452" > +<cdparam x="330" y="404" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from Assumption to Assumption" value="<<composition>>" /> +<TGConnectingPoint num="0" id="451" /> +<P1 x="164" y="181" id="386" /> +<P2 x="164" y="148" id="421" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> + +</AvatarMADPanel> + <AvatarMADPanel name="Modeling Assumptions Diagram 2" minX="10" maxX="1900" minY="10" maxY="900" zoom="1.0" > <COMPONENT type="5252" id="28" > <cdparam x="477" y="458" /> @@ -483,415 +749,149 @@ </AvatarMADPanel> -<AvatarMADPanel name="Modeling Assumptions Diagram 1" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0" > -<COMPONENT type="5251" id="478" > -<cdparam x="357" y="193" /> -<sizeparam width="244" height="30" minWidth="10" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="105" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> -<infoparam name="AvatarDiagramReference" value="DroneDesign1" /> -<TGConnectingPoint num="0" id="451" /> -<TGConnectingPoint num="1" id="452" /> -<TGConnectingPoint num="2" id="453" /> -<TGConnectingPoint num="3" id="454" /> -<TGConnectingPoint num="4" id="455" /> -<TGConnectingPoint num="5" id="456" /> -<TGConnectingPoint num="6" id="457" /> -<TGConnectingPoint num="7" id="458" /> -<TGConnectingPoint num="8" id="459" /> -<TGConnectingPoint num="9" id="460" /> -<TGConnectingPoint num="10" id="461" /> -<TGConnectingPoint num="11" id="462" /> -<TGConnectingPoint num="12" id="463" /> -<TGConnectingPoint num="13" id="464" /> -<TGConnectingPoint num="14" id="465" /> -<TGConnectingPoint num="15" id="466" /> -<TGConnectingPoint num="16" id="467" /> -<TGConnectingPoint num="17" id="468" /> -<TGConnectingPoint num="18" id="469" /> -<TGConnectingPoint num="19" id="470" /> -<TGConnectingPoint num="20" id="471" /> -<TGConnectingPoint num="21" id="472" /> -<TGConnectingPoint num="22" id="473" /> -<TGConnectingPoint num="23" id="474" /> -<TGConnectingPoint num="24" id="475" /> -<TGConnectingPoint num="25" id="476" /> -<TGConnectingPoint num="26" id="477" /> -</COMPONENT> - -<COMPONENT type="5252" id="506" > -<cdparam x="368" y="271" /> -<sizeparam width="271" height="41" minWidth="10" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="203" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> -<infoparam name="AvatarElementReference" value="Block_LineRecognitionAlgorithm" /> -<TGConnectingPoint num="0" id="479" /> -<TGConnectingPoint num="1" id="480" /> -<TGConnectingPoint num="2" id="481" /> -<TGConnectingPoint num="3" id="482" /> -<TGConnectingPoint num="4" id="483" /> -<TGConnectingPoint num="5" id="484" /> -<TGConnectingPoint num="6" id="485" /> -<TGConnectingPoint num="7" id="486" /> -<TGConnectingPoint num="8" id="487" /> -<TGConnectingPoint num="9" id="488" /> -<TGConnectingPoint num="10" id="489" /> -<TGConnectingPoint num="11" id="490" /> -<TGConnectingPoint num="12" id="491" /> -<TGConnectingPoint num="13" id="492" /> -<TGConnectingPoint num="14" id="493" /> -<TGConnectingPoint num="15" id="494" /> -<TGConnectingPoint num="16" id="495" /> -<TGConnectingPoint num="17" id="496" /> -<TGConnectingPoint num="18" id="497" /> -<TGConnectingPoint num="19" id="498" /> -<TGConnectingPoint num="20" id="499" /> -<TGConnectingPoint num="21" id="500" /> -<TGConnectingPoint num="22" id="501" /> -<TGConnectingPoint num="23" id="502" /> -<TGConnectingPoint num="24" id="503" /> -<TGConnectingPoint num="25" id="504" /> -<TGConnectingPoint num="26" id="505" /> -</COMPONENT> - -<COMPONENT type="5250" id="538" > -<cdparam x="353" y="33" /> -<sizeparam width="259" height="119" minWidth="1" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="101" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> -<infoparam name="Assumption" value="CrossingSigns" /> -<TGConnectingPoint num="0" id="507" /> -<TGConnectingPoint num="1" id="508" /> -<TGConnectingPoint num="2" id="509" /> -<TGConnectingPoint num="3" id="510" /> -<TGConnectingPoint num="4" id="511" /> -<TGConnectingPoint num="5" id="512" /> -<TGConnectingPoint num="6" id="513" /> -<TGConnectingPoint num="7" id="514" /> -<TGConnectingPoint num="8" id="515" /> -<TGConnectingPoint num="9" id="516" /> -<TGConnectingPoint num="10" id="517" /> -<TGConnectingPoint num="11" id="518" /> -<TGConnectingPoint num="12" id="519" /> -<TGConnectingPoint num="13" id="520" /> -<TGConnectingPoint num="14" id="521" /> -<TGConnectingPoint num="15" id="522" /> -<TGConnectingPoint num="16" id="523" /> -<TGConnectingPoint num="17" id="524" /> -<TGConnectingPoint num="18" id="525" /> -<TGConnectingPoint num="19" id="526" /> -<TGConnectingPoint num="20" id="527" /> -<TGConnectingPoint num="21" id="528" /> -<TGConnectingPoint num="22" id="529" /> -<TGConnectingPoint num="23" id="530" /> -<TGConnectingPoint num="24" id="531" /> -<TGConnectingPoint num="25" id="532" /> -<TGConnectingPoint num="26" id="533" /> -<TGConnectingPoint num="27" id="534" /> -<TGConnectingPoint num="28" id="535" /> -<TGConnectingPoint num="29" id="536" /> -<TGConnectingPoint num="30" id="537" /> -<extraparam> -<textline data="The drone is informed " /> -<textline data="about the crossing" /> -<textline data="identified with a sign" /> -<type data="0" /> -<durability data="1" /> -<source data="3" /> -<status data="1" /> -<limitation data="3" /> -</extraparam> -</COMPONENT> - -<COMPONENT type="5250" id="570" > -<cdparam x="73" y="181" /> -<sizeparam width="183" height="139" minWidth="1" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="69" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> -<infoparam name="Assumption" value="RedLine" /> -<TGConnectingPoint num="0" id="539" /> -<TGConnectingPoint num="1" id="540" /> -<TGConnectingPoint num="2" id="541" /> -<TGConnectingPoint num="3" id="542" /> -<TGConnectingPoint num="4" id="543" /> -<TGConnectingPoint num="5" id="544" /> -<TGConnectingPoint num="6" id="545" /> -<TGConnectingPoint num="7" id="546" /> -<TGConnectingPoint num="8" id="547" /> -<TGConnectingPoint num="9" id="548" /> -<TGConnectingPoint num="10" id="549" /> -<TGConnectingPoint num="11" id="550" /> -<TGConnectingPoint num="12" id="551" /> -<TGConnectingPoint num="13" id="552" /> -<TGConnectingPoint num="14" id="553" /> -<TGConnectingPoint num="15" id="554" /> -<TGConnectingPoint num="16" id="555" /> -<TGConnectingPoint num="17" id="556" /> -<TGConnectingPoint num="18" id="557" /> -<TGConnectingPoint num="19" id="558" /> -<TGConnectingPoint num="20" id="559" /> -<TGConnectingPoint num="21" id="560" /> -<TGConnectingPoint num="22" id="561" /> -<TGConnectingPoint num="23" id="562" /> -<TGConnectingPoint num="24" id="563" /> -<TGConnectingPoint num="25" id="564" /> -<TGConnectingPoint num="26" id="565" /> -<TGConnectingPoint num="27" id="566" /> -<TGConnectingPoint num="28" id="567" /> -<TGConnectingPoint num="29" id="568" /> -<TGConnectingPoint num="30" id="569" /> -<extraparam> -<textline data="A reline is assumed " /> -<textline data="to be paintd/sticked " /> -<textline data="on the floor in order " /> -<textline data="to guide the drone." /> -<type data="0" /> -<durability data="2" /> -<source data="3" /> -<status data="1" /> -<limitation data="3" /> -</extraparam> -</COMPONENT> - -<COMPONENT type="5250" id="602" > -<cdparam x="64" y="37" /> -<sizeparam width="200" height="111" minWidth="1" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="117" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> -<infoparam name="Assumption" value="SignsToNavigate" /> -<TGConnectingPoint num="0" id="571" /> -<TGConnectingPoint num="1" id="572" /> -<TGConnectingPoint num="2" id="573" /> -<TGConnectingPoint num="3" id="574" /> -<TGConnectingPoint num="4" id="575" /> -<TGConnectingPoint num="5" id="576" /> -<TGConnectingPoint num="6" id="577" /> -<TGConnectingPoint num="7" id="578" /> -<TGConnectingPoint num="8" id="579" /> -<TGConnectingPoint num="9" id="580" /> -<TGConnectingPoint num="10" id="581" /> -<TGConnectingPoint num="11" id="582" /> -<TGConnectingPoint num="12" id="583" /> -<TGConnectingPoint num="13" id="584" /> -<TGConnectingPoint num="14" id="585" /> -<TGConnectingPoint num="15" id="586" /> -<TGConnectingPoint num="16" id="587" /> -<TGConnectingPoint num="17" id="588" /> -<TGConnectingPoint num="18" id="589" /> -<TGConnectingPoint num="19" id="590" /> -<TGConnectingPoint num="20" id="591" /> -<TGConnectingPoint num="21" id="592" /> -<TGConnectingPoint num="22" id="593" /> -<TGConnectingPoint num="23" id="594" /> -<TGConnectingPoint num="24" id="595" /> -<TGConnectingPoint num="25" id="596" /> -<TGConnectingPoint num="26" id="597" /> -<TGConnectingPoint num="27" id="598" /> -<TGConnectingPoint num="28" id="599" /> -<TGConnectingPoint num="29" id="600" /> -<TGConnectingPoint num="30" id="601" /> -<extraparam> -<textline data="Assumption description:" /> -<textline data="Double-click to edit" /> -<type data="0" /> -<durability data="1" /> -<source data="2" /> -<status data="1" /> -<limitation data="0" /> -</extraparam> -</COMPONENT> - -<CONNECTOR type="5257" id="604" > -<cdparam x="480" y="283" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector" value="{info}" /> -<TGConnectingPoint num="0" id="603" /> -<P1 x="503" y="271" id="486" /> -<P2 x="479" y="223" id="461" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="5255" id="606" > -<cdparam x="256" y="263" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector" value="<<impact>>" /> -<TGConnectingPoint num="0" id="605" /> -<P1 x="256" y="215" id="554" /> -<P2 x="357" y="215" id="453" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="5253" id="608" > -<cdparam x="354" y="101" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from Assumption to Assumption" value="<<composition>>" /> -<TGConnectingPoint num="0" id="607" /> -<P1 x="353" y="92" id="508" /> -<P2 x="264" y="92" id="575" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="5255" id="610" > -<cdparam x="480" y="237" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from AvatarDiagramReference to AvatarElementReference" value="<<impact>>" /> -<TGConnectingPoint num="0" id="609" /> -<P1 x="256" y="285" id="556" /> -<P2 x="368" y="291" id="480" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="5253" id="612" > -<cdparam x="330" y="404" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from Assumption to Assumption" value="<<composition>>" /> -<TGConnectingPoint num="0" id="611" /> -<P1 x="164" y="181" id="546" /> -<P2 x="164" y="148" id="581" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> - -</AvatarMADPanel> - <AvatarMADPanel name="Modeling Assumptions Diagram 3" minX="10" maxX="1400" minY="10" maxY="900" zoom="1.0" > -<COMPONENT type="5252" id="318" > +<COMPONENT type="5252" id="480" > <cdparam x="549" y="173" /> <sizeparam width="169" height="30" minWidth="10" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="142" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="AvatarElementReference" value="Block_MainController" /> -<TGConnectingPoint num="0" id="291" /> -<TGConnectingPoint num="1" id="292" /> -<TGConnectingPoint num="2" id="293" /> -<TGConnectingPoint num="3" id="294" /> -<TGConnectingPoint num="4" id="295" /> -<TGConnectingPoint num="5" id="296" /> -<TGConnectingPoint num="6" id="297" /> -<TGConnectingPoint num="7" id="298" /> -<TGConnectingPoint num="8" id="299" /> -<TGConnectingPoint num="9" id="300" /> -<TGConnectingPoint num="10" id="301" /> -<TGConnectingPoint num="11" id="302" /> -<TGConnectingPoint num="12" id="303" /> -<TGConnectingPoint num="13" id="304" /> -<TGConnectingPoint num="14" id="305" /> -<TGConnectingPoint num="15" id="306" /> -<TGConnectingPoint num="16" id="307" /> -<TGConnectingPoint num="17" id="308" /> -<TGConnectingPoint num="18" id="309" /> -<TGConnectingPoint num="19" id="310" /> -<TGConnectingPoint num="20" id="311" /> -<TGConnectingPoint num="21" id="312" /> -<TGConnectingPoint num="22" id="313" /> -<TGConnectingPoint num="23" id="314" /> -<TGConnectingPoint num="24" id="315" /> -<TGConnectingPoint num="25" id="316" /> -<TGConnectingPoint num="26" id="317" /> -</COMPONENT> - -<COMPONENT type="5252" id="346" > +<TGConnectingPoint num="0" id="453" /> +<TGConnectingPoint num="1" id="454" /> +<TGConnectingPoint num="2" id="455" /> +<TGConnectingPoint num="3" id="456" /> +<TGConnectingPoint num="4" id="457" /> +<TGConnectingPoint num="5" id="458" /> +<TGConnectingPoint num="6" id="459" /> +<TGConnectingPoint num="7" id="460" /> +<TGConnectingPoint num="8" id="461" /> +<TGConnectingPoint num="9" id="462" /> +<TGConnectingPoint num="10" id="463" /> +<TGConnectingPoint num="11" id="464" /> +<TGConnectingPoint num="12" id="465" /> +<TGConnectingPoint num="13" id="466" /> +<TGConnectingPoint num="14" id="467" /> +<TGConnectingPoint num="15" id="468" /> +<TGConnectingPoint num="16" id="469" /> +<TGConnectingPoint num="17" id="470" /> +<TGConnectingPoint num="18" id="471" /> +<TGConnectingPoint num="19" id="472" /> +<TGConnectingPoint num="20" id="473" /> +<TGConnectingPoint num="21" id="474" /> +<TGConnectingPoint num="22" id="475" /> +<TGConnectingPoint num="23" id="476" /> +<TGConnectingPoint num="24" id="477" /> +<TGConnectingPoint num="25" id="478" /> +<TGConnectingPoint num="26" id="479" /> +</COMPONENT> + +<COMPONENT type="5252" id="508" > <cdparam x="762" y="172" /> <sizeparam width="163" height="30" minWidth="10" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="129" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="AvatarElementReference" value="Block_RemoteUSer" /> -<TGConnectingPoint num="0" id="319" /> -<TGConnectingPoint num="1" id="320" /> -<TGConnectingPoint num="2" id="321" /> -<TGConnectingPoint num="3" id="322" /> -<TGConnectingPoint num="4" id="323" /> -<TGConnectingPoint num="5" id="324" /> -<TGConnectingPoint num="6" id="325" /> -<TGConnectingPoint num="7" id="326" /> -<TGConnectingPoint num="8" id="327" /> -<TGConnectingPoint num="9" id="328" /> -<TGConnectingPoint num="10" id="329" /> -<TGConnectingPoint num="11" id="330" /> -<TGConnectingPoint num="12" id="331" /> -<TGConnectingPoint num="13" id="332" /> -<TGConnectingPoint num="14" id="333" /> -<TGConnectingPoint num="15" id="334" /> -<TGConnectingPoint num="16" id="335" /> -<TGConnectingPoint num="17" id="336" /> -<TGConnectingPoint num="18" id="337" /> -<TGConnectingPoint num="19" id="338" /> -<TGConnectingPoint num="20" id="339" /> -<TGConnectingPoint num="21" id="340" /> -<TGConnectingPoint num="22" id="341" /> -<TGConnectingPoint num="23" id="342" /> -<TGConnectingPoint num="24" id="343" /> -<TGConnectingPoint num="25" id="344" /> -<TGConnectingPoint num="26" id="345" /> -</COMPONENT> - -<COMPONENT type="5251" id="374" > +<TGConnectingPoint num="0" id="481" /> +<TGConnectingPoint num="1" id="482" /> +<TGConnectingPoint num="2" id="483" /> +<TGConnectingPoint num="3" id="484" /> +<TGConnectingPoint num="4" id="485" /> +<TGConnectingPoint num="5" id="486" /> +<TGConnectingPoint num="6" id="487" /> +<TGConnectingPoint num="7" id="488" /> +<TGConnectingPoint num="8" id="489" /> +<TGConnectingPoint num="9" id="490" /> +<TGConnectingPoint num="10" id="491" /> +<TGConnectingPoint num="11" id="492" /> +<TGConnectingPoint num="12" id="493" /> +<TGConnectingPoint num="13" id="494" /> +<TGConnectingPoint num="14" id="495" /> +<TGConnectingPoint num="15" id="496" /> +<TGConnectingPoint num="16" id="497" /> +<TGConnectingPoint num="17" id="498" /> +<TGConnectingPoint num="18" id="499" /> +<TGConnectingPoint num="19" id="500" /> +<TGConnectingPoint num="20" id="501" /> +<TGConnectingPoint num="21" id="502" /> +<TGConnectingPoint num="22" id="503" /> +<TGConnectingPoint num="23" id="504" /> +<TGConnectingPoint num="24" id="505" /> +<TGConnectingPoint num="25" id="506" /> +<TGConnectingPoint num="26" id="507" /> +</COMPONENT> + +<COMPONENT type="5251" id="536" > <cdparam x="633" y="297" /> <sizeparam width="201" height="30" minWidth="10" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="105" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="AvatarDiagramReference" value="DroneDesign3" /> -<TGConnectingPoint num="0" id="347" /> -<TGConnectingPoint num="1" id="348" /> -<TGConnectingPoint num="2" id="349" /> -<TGConnectingPoint num="3" id="350" /> -<TGConnectingPoint num="4" id="351" /> -<TGConnectingPoint num="5" id="352" /> -<TGConnectingPoint num="6" id="353" /> -<TGConnectingPoint num="7" id="354" /> -<TGConnectingPoint num="8" id="355" /> -<TGConnectingPoint num="9" id="356" /> -<TGConnectingPoint num="10" id="357" /> -<TGConnectingPoint num="11" id="358" /> -<TGConnectingPoint num="12" id="359" /> -<TGConnectingPoint num="13" id="360" /> -<TGConnectingPoint num="14" id="361" /> -<TGConnectingPoint num="15" id="362" /> -<TGConnectingPoint num="16" id="363" /> -<TGConnectingPoint num="17" id="364" /> -<TGConnectingPoint num="18" id="365" /> -<TGConnectingPoint num="19" id="366" /> -<TGConnectingPoint num="20" id="367" /> -<TGConnectingPoint num="21" id="368" /> -<TGConnectingPoint num="22" id="369" /> -<TGConnectingPoint num="23" id="370" /> -<TGConnectingPoint num="24" id="371" /> -<TGConnectingPoint num="25" id="372" /> -<TGConnectingPoint num="26" id="373" /> -</COMPONENT> - -<COMPONENT type="5250" id="406" > +<TGConnectingPoint num="0" id="509" /> +<TGConnectingPoint num="1" id="510" /> +<TGConnectingPoint num="2" id="511" /> +<TGConnectingPoint num="3" id="512" /> +<TGConnectingPoint num="4" id="513" /> +<TGConnectingPoint num="5" id="514" /> +<TGConnectingPoint num="6" id="515" /> +<TGConnectingPoint num="7" id="516" /> +<TGConnectingPoint num="8" id="517" /> +<TGConnectingPoint num="9" id="518" /> +<TGConnectingPoint num="10" id="519" /> +<TGConnectingPoint num="11" id="520" /> +<TGConnectingPoint num="12" id="521" /> +<TGConnectingPoint num="13" id="522" /> +<TGConnectingPoint num="14" id="523" /> +<TGConnectingPoint num="15" id="524" /> +<TGConnectingPoint num="16" id="525" /> +<TGConnectingPoint num="17" id="526" /> +<TGConnectingPoint num="18" id="527" /> +<TGConnectingPoint num="19" id="528" /> +<TGConnectingPoint num="20" id="529" /> +<TGConnectingPoint num="21" id="530" /> +<TGConnectingPoint num="22" id="531" /> +<TGConnectingPoint num="23" id="532" /> +<TGConnectingPoint num="24" id="533" /> +<TGConnectingPoint num="25" id="534" /> +<TGConnectingPoint num="26" id="535" /> +</COMPONENT> + +<COMPONENT type="5250" id="568" > <cdparam x="283" y="225" /> <sizeparam width="191" height="118" minWidth="1" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="120" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="Assumption" value="FollowingPersons" /> -<TGConnectingPoint num="0" id="375" /> -<TGConnectingPoint num="1" id="376" /> -<TGConnectingPoint num="2" id="377" /> -<TGConnectingPoint num="3" id="378" /> -<TGConnectingPoint num="4" id="379" /> -<TGConnectingPoint num="5" id="380" /> -<TGConnectingPoint num="6" id="381" /> -<TGConnectingPoint num="7" id="382" /> -<TGConnectingPoint num="8" id="383" /> -<TGConnectingPoint num="9" id="384" /> -<TGConnectingPoint num="10" id="385" /> -<TGConnectingPoint num="11" id="386" /> -<TGConnectingPoint num="12" id="387" /> -<TGConnectingPoint num="13" id="388" /> -<TGConnectingPoint num="14" id="389" /> -<TGConnectingPoint num="15" id="390" /> -<TGConnectingPoint num="16" id="391" /> -<TGConnectingPoint num="17" id="392" /> -<TGConnectingPoint num="18" id="393" /> -<TGConnectingPoint num="19" id="394" /> -<TGConnectingPoint num="20" id="395" /> -<TGConnectingPoint num="21" id="396" /> -<TGConnectingPoint num="22" id="397" /> -<TGConnectingPoint num="23" id="398" /> -<TGConnectingPoint num="24" id="399" /> -<TGConnectingPoint num="25" id="400" /> -<TGConnectingPoint num="26" id="401" /> -<TGConnectingPoint num="27" id="402" /> -<TGConnectingPoint num="28" id="403" /> -<TGConnectingPoint num="29" id="404" /> -<TGConnectingPoint num="30" id="405" /> +<TGConnectingPoint num="0" id="537" /> +<TGConnectingPoint num="1" id="538" /> +<TGConnectingPoint num="2" id="539" /> +<TGConnectingPoint num="3" id="540" /> +<TGConnectingPoint num="4" id="541" /> +<TGConnectingPoint num="5" id="542" /> +<TGConnectingPoint num="6" id="543" /> +<TGConnectingPoint num="7" id="544" /> +<TGConnectingPoint num="8" id="545" /> +<TGConnectingPoint num="9" id="546" /> +<TGConnectingPoint num="10" id="547" /> +<TGConnectingPoint num="11" id="548" /> +<TGConnectingPoint num="12" id="549" /> +<TGConnectingPoint num="13" id="550" /> +<TGConnectingPoint num="14" id="551" /> +<TGConnectingPoint num="15" id="552" /> +<TGConnectingPoint num="16" id="553" /> +<TGConnectingPoint num="17" id="554" /> +<TGConnectingPoint num="18" id="555" /> +<TGConnectingPoint num="19" id="556" /> +<TGConnectingPoint num="20" id="557" /> +<TGConnectingPoint num="21" id="558" /> +<TGConnectingPoint num="22" id="559" /> +<TGConnectingPoint num="23" id="560" /> +<TGConnectingPoint num="24" id="561" /> +<TGConnectingPoint num="25" id="562" /> +<TGConnectingPoint num="26" id="563" /> +<TGConnectingPoint num="27" id="564" /> +<TGConnectingPoint num="28" id="565" /> +<TGConnectingPoint num="29" id="566" /> +<TGConnectingPoint num="30" id="567" /> <extraparam> <textline data="The drone can follow " /> <textline data="a person when it needs" /> @@ -905,43 +905,43 @@ </extraparam> </COMPONENT> -<COMPONENT type="5250" id="438" > +<COMPONENT type="5250" id="600" > <cdparam x="286" y="56" /> <sizeparam width="188" height="120" minWidth="1" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="67" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="Assumption" value="NoDoor" /> -<TGConnectingPoint num="0" id="407" /> -<TGConnectingPoint num="1" id="408" /> -<TGConnectingPoint num="2" id="409" /> -<TGConnectingPoint num="3" id="410" /> -<TGConnectingPoint num="4" id="411" /> -<TGConnectingPoint num="5" id="412" /> -<TGConnectingPoint num="6" id="413" /> -<TGConnectingPoint num="7" id="414" /> -<TGConnectingPoint num="8" id="415" /> -<TGConnectingPoint num="9" id="416" /> -<TGConnectingPoint num="10" id="417" /> -<TGConnectingPoint num="11" id="418" /> -<TGConnectingPoint num="12" id="419" /> -<TGConnectingPoint num="13" id="420" /> -<TGConnectingPoint num="14" id="421" /> -<TGConnectingPoint num="15" id="422" /> -<TGConnectingPoint num="16" id="423" /> -<TGConnectingPoint num="17" id="424" /> -<TGConnectingPoint num="18" id="425" /> -<TGConnectingPoint num="19" id="426" /> -<TGConnectingPoint num="20" id="427" /> -<TGConnectingPoint num="21" id="428" /> -<TGConnectingPoint num="22" id="429" /> -<TGConnectingPoint num="23" id="430" /> -<TGConnectingPoint num="24" id="431" /> -<TGConnectingPoint num="25" id="432" /> -<TGConnectingPoint num="26" id="433" /> -<TGConnectingPoint num="27" id="434" /> -<TGConnectingPoint num="28" id="435" /> -<TGConnectingPoint num="29" id="436" /> -<TGConnectingPoint num="30" id="437" /> +<TGConnectingPoint num="0" id="569" /> +<TGConnectingPoint num="1" id="570" /> +<TGConnectingPoint num="2" id="571" /> +<TGConnectingPoint num="3" id="572" /> +<TGConnectingPoint num="4" id="573" /> +<TGConnectingPoint num="5" id="574" /> +<TGConnectingPoint num="6" id="575" /> +<TGConnectingPoint num="7" id="576" /> +<TGConnectingPoint num="8" id="577" /> +<TGConnectingPoint num="9" id="578" /> +<TGConnectingPoint num="10" id="579" /> +<TGConnectingPoint num="11" id="580" /> +<TGConnectingPoint num="12" id="581" /> +<TGConnectingPoint num="13" id="582" /> +<TGConnectingPoint num="14" id="583" /> +<TGConnectingPoint num="15" id="584" /> +<TGConnectingPoint num="16" id="585" /> +<TGConnectingPoint num="17" id="586" /> +<TGConnectingPoint num="18" id="587" /> +<TGConnectingPoint num="19" id="588" /> +<TGConnectingPoint num="20" id="589" /> +<TGConnectingPoint num="21" id="590" /> +<TGConnectingPoint num="22" id="591" /> +<TGConnectingPoint num="23" id="592" /> +<TGConnectingPoint num="24" id="593" /> +<TGConnectingPoint num="25" id="594" /> +<TGConnectingPoint num="26" id="595" /> +<TGConnectingPoint num="27" id="596" /> +<TGConnectingPoint num="28" id="597" /> +<TGConnectingPoint num="29" id="598" /> +<TGConnectingPoint num="30" id="599" /> <extraparam> <textline data="The drone cannot " /> <textline data="go through doors " /> @@ -953,58 +953,58 @@ </extraparam> </COMPONENT> -<CONNECTOR type="5255" id="440" > +<CONNECTOR type="5255" id="602" > <cdparam x="474" y="313" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="<<impact>>" /> -<TGConnectingPoint num="0" id="439" /> -<P1 x="474" y="313" id="392" /> -<P2 x="633" y="312" id="348" /> +<TGConnectingPoint num="0" id="601" /> +<P1 x="474" y="313" id="554" /> +<P2 x="633" y="312" id="510" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="5255" id="442" > +<CONNECTOR type="5255" id="604" > <cdparam x="474" y="313" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="<<impact>>" /> -<TGConnectingPoint num="0" id="441" /> -<P1 x="474" y="284" id="391" /> -<P2 x="802" y="202" id="328" /> +<TGConnectingPoint num="0" id="603" /> +<P1 x="474" y="284" id="553" /> +<P2 x="802" y="202" id="490" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="5255" id="444" > +<CONNECTOR type="5255" id="606" > <cdparam x="474" y="284" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="<<impact>>" /> -<TGConnectingPoint num="0" id="443" /> -<P1 x="474" y="254" id="390" /> -<P2 x="591" y="203" id="300" /> +<TGConnectingPoint num="0" id="605" /> +<P1 x="474" y="254" id="552" /> +<P2 x="591" y="203" id="462" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="5257" id="446" > +<CONNECTOR type="5257" id="608" > <cdparam x="843" y="202" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="{info}" /> -<TGConnectingPoint num="0" id="445" /> -<P1 x="843" y="202" id="329" /> -<P2 x="783" y="297" id="355" /> +<TGConnectingPoint num="0" id="607" /> +<P1 x="843" y="202" id="491" /> +<P2 x="783" y="297" id="517" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="5257" id="448" > +<CONNECTOR type="5257" id="610" > <cdparam x="633" y="203" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="{info}" /> -<TGConnectingPoint num="0" id="447" /> -<P1 x="633" y="203" id="301" /> -<P2 x="683" y="297" id="353" /> +<TGConnectingPoint num="0" id="609" /> +<P1 x="633" y="203" id="463" /> +<P2 x="683" y="297" id="515" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="5254" id="450" > +<CONNECTOR type="5254" id="612" > <cdparam x="449" y="192" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from Assumption to Assumption" value="<<versioning>>" /> -<TGConnectingPoint num="0" id="449" /> -<P1 x="380" y="176" id="417" /> -<P2 x="378" y="225" id="382" /> +<TGConnectingPoint num="0" id="611" /> +<P1 x="380" y="176" id="579" /> +<P2 x="378" y="225" id="544" /> <AutomaticDrawing data="true" /> <extraparam> <oldVersion data="2" /> @@ -1125,7 +1125,7 @@ </CONNECTOR> <COMPONENT type="301" id="641" > <cdparam x="832" y="472" /> -<sizeparam width="351" height="147" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="276" height="147" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="UML Note" value="Command values: @@ -10175,7 +10175,7 @@ Command mode: <cdparam x="591" y="248" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from UML Note to DataType0" value="null" /> -<P1 x="588" y="248" id="4551" /> +<P1 x="591" y="248" id="4551" /> <P2 x="558" y="226" id="4732" /> <AutomaticDrawing data="false" /> </CONNECTOR> @@ -10281,7 +10281,7 @@ Command mode: </CONNECTOR> <COMPONENT type="301" id="4566" > <cdparam x="506" y="248" /> -<sizeparam width="165" height="159" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="170" height="159" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="UML Note" value="Command values: diff --git a/src/ui/GTURTLEModeling.java b/src/ui/GTURTLEModeling.java index 8e5aaef1ae..61b98f38f7 100755 --- a/src/ui/GTURTLEModeling.java +++ b/src/ui/GTURTLEModeling.java @@ -99,6 +99,7 @@ import tpndescription.*; import ui.diplodocusmethodology.*; import ui.avatarmethodology.*; +import ui.sysmlsecmethodology.*; import ui.tmlad.*; import ui.tmlcd.*; import ui.tmlcompd.*; @@ -3010,7 +3011,7 @@ public class GTURTLEModeling { }else if (tdp instanceof AvatarMethodologyDiagramPanel) { - nl = doc.getElementsByTagName("DiplodocusMethodologyDiagramPanelCopy"); + nl = doc.getElementsByTagName("AvatarMethodologyDiagramPanelCopy"); docCopy = doc; if (nl == null) { @@ -3023,6 +3024,57 @@ public class GTURTLEModeling { AvatarMethodologyDiagramPanel amdp = (AvatarMethodologyDiagramPanel)tdp; + for(i=0; i<nl.getLength(); i++) { + adn = nl.item(i); + if (adn.getNodeType() == Node.ELEMENT_NODE) { + elt = (Element) adn; + + if (amdp == null) { + throw new MalformedModelingException(); + } + + //int xSel = Integer.decode(elt.getAttribute("xSel")).intValue(); + //int ySel = Integer.decode(elt.getAttribute("ySel")).intValue(); + //int widthSel = Integer.decode(elt.getAttribute("widthSel")).intValue(); + //int heightSel = Integer.decode(elt.getAttribute("heightSel")).intValue(); + + decX = _decX; + decY = _decY; + + amdp.loadExtraParameters(elt); + + //TraceManager.addDev("Toto 2"); + + //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " components"); + makeXMLComponents(elt.getElementsByTagName("COMPONENT"), amdp); + //TraceManager.addDev("Toto 3"); + makePostProcessing(amdp); + //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " connectors"); + makeXMLConnectors(elt.getElementsByTagName("CONNECTOR"), amdp); + //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " subcomponents"); + makeXMLComponents(elt.getElementsByTagName("SUBCOMPONENT"), amdp); + //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " real points"); + connectConnectorsToRealPoints(amdp); + amdp.structureChanged(); + //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " post loading " + beginIndex); + makePostLoading(amdp, beginIndex); + //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " post loading done"); + } + } + }else if (tdp instanceof SysmlsecMethodologyDiagramPanel) { + nl = doc.getElementsByTagName("SysmlsecMethodologyDiagramPanelCopy"); + docCopy = doc; + + if (nl == null) { + return; + } + + //TraceManager.addDev("Toto 1"); + + + SysmlsecMethodologyDiagramPanel amdp = (SysmlsecMethodologyDiagramPanel)tdp; + + for(i=0; i<nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { @@ -4017,6 +4069,8 @@ public class GTURTLEModeling { loadDiplodocusMethodology(node); } else if (type.compareTo("Avatar Methodology") == 0) { loadAvatarMethodology(node); + } else if (type.compareTo("Sysmlsec Methodology") == 0) { + loadSysmlsecMethodology(node); } else if (type.compareTo("TML Design") == 0) { loadTMLDesign(node); } else if (type.compareTo("TML Component Design") == 0) { @@ -4470,9 +4524,37 @@ public class GTURTLEModeling { elt = (Element)node; if (elt.getTagName().compareTo("AvatarMethodologyDiagramPanel") == 0) { // Class diagram - //TraceManager.addDev("Loading TML CD"); + TraceManager.addDev("Loading Avatar methodo"); loadAvatarMethodologyDiagram(elt, indexDesign); - //TraceManager.addDev("End loading TML CD"); + TraceManager.addDev("End Loading avatar methodo"); + } + } + } + } + + public void loadSysmlsecMethodology(Node node) throws MalformedModelingException, SAXException { + Element elt = (Element) node; + String nameTab; + NodeList diagramNl; + int indexDesign; + + + nameTab = elt.getAttribute("nameTab"); + + indexDesign = mgui.createSysmlsecMethodology(nameTab); + + diagramNl = node.getChildNodes(); + + for(int j=0; j<diagramNl.getLength(); j++) { + //TraceManager.addDev("Design nodes: " + j); + node = diagramNl.item(j); + if (node.getNodeType() == Node.ELEMENT_NODE) { + elt = (Element)node; + if (elt.getTagName().compareTo("SysmlsecMethodologyDiagramPanel") == 0) { + // Class diagram + TraceManager.addDev("Loading SysMLSec methodo"); + loadSysmlsecMethodologyDiagram(elt, indexDesign); + TraceManager.addDev("End loading SysMLSec methodo"); } } } @@ -4945,6 +5027,22 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } + public void loadSysmlsecMethodologyDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + + String name; + TDiagramPanel tdp; + + // class diagram name + name = elt.getAttribute("name"); + mgui.setSysmlsecMethodologyDiagramName(indexDesign, name); + tdp = mgui.getMainTDiagramPanel(indexDesign); + tdp.setName(name); + + //TraceManager.addDev("tdp=" + tdp.getName()); + + loadDiagram(elt, tdp); + } + public void loadTMLTaskDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; diff --git a/src/ui/JMenuBarTurtle.java b/src/ui/JMenuBarTurtle.java index 65cf26e589..d70faba4ff 100755 --- a/src/ui/JMenuBarTurtle.java +++ b/src/ui/JMenuBarTurtle.java @@ -1,47 +1,47 @@ /**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille -ludovic.apvrille AT enst.fr - -This software is a computer program whose purpose is to allow the -edition of TURTLE analysis, design and deployment diagrams, to -allow the generation of RT-LOTOS or Java code from this diagram, -and at last to allow the analysis of formal validation traces -obtained from external tools, e.g. RTL from LAAS-CNRS and CADP -from INRIA Rhone-Alpes. - -This software is governed by the CeCILL license under French law and -abiding by the rules of distribution of free software. You can use, -modify and/ or redistribute the software under the terms of the CeCILL -license as circulated by CEA, CNRS and INRIA at the following URL -"http://www.cecill.info". - -As a counterpart to the access to the source code and rights to copy, -modify and redistribute granted by the license, users are provided only -with a limited warranty and the software's author, the holder of the -economic rights, and the successive licensors have only limited -liability. - -In this respect, the user's attention is drawn to the risks associated -with loading, using, modifying and/or developing or reproducing the -software by the user in light of its specific status of free software, -that may mean that it is complicated to manipulate, and that also -therefore means that it is reserved for developers and experienced -professionals having in-depth computer knowledge. Users are therefore -encouraged to load and test the software's suitability as regards their -requirements in conditions enabling the security of their systems and/or -data to be ensured and, more generally, to use and operate it in the -same conditions as regards security. - -The fact that you are presently reading this means that you have had -knowledge of the CeCILL license and that you accept its terms. - -/** - * Class JMenuBarTurtle - * Creation: 09/12/2003 - * Version 1.0 09/12/2003 - * @author Ludovic APVRILLE - * @see - */ + ludovic.apvrille AT enst.fr + + This software is a computer program whose purpose is to allow the + edition of TURTLE analysis, design and deployment diagrams, to + allow the generation of RT-LOTOS or Java code from this diagram, + and at last to allow the analysis of formal validation traces + obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + from INRIA Rhone-Alpes. + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited + liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + /** + * Class JMenuBarTurtle + * Creation: 09/12/2003 + * Version 1.0 09/12/2003 + * @author Ludovic APVRILLE + * @see + */ package ui; @@ -51,44 +51,44 @@ import javax.swing.*; //import java.awt.event.*; -public class JMenuBarTurtle extends JMenuBar { +public class JMenuBarTurtle extends JMenuBar { private JMenu menugraph; - + //Menu private JMenu file, saveLastGraph, diagram, cd, ad, iod, ucd, sd, edit, vAndV, codeG, view, tool, capture, ontologies, help; - + public JMenuBarTurtle(MainGUI mgui) { super(); buildMenus(mgui); } - + public JMenu getJMenuGraph() { return menugraph; } - + public void addMenuItem(JMenu menu, String text, MainGUI mgui) { JMenuItem menuItem; - + menuItem = menu.add(text); menuItem.addMouseListener(mgui.mouseHandler); menuItem.addActionListener(mgui); } - - + + // Menus - private void buildMenus(MainGUI mgui) { - // Main menu + private void buildMenus(MainGUI mgui) { + // Main menu file = new JMenu("File"); edit = new JMenu("Edit"); diagram = new JMenu("Diagram"); - vAndV = new JMenu("V&V"); - codeG = new JMenu("Code Generation"); + vAndV = new JMenu("V&V"); + codeG = new JMenu("Code Generation"); view = new JMenu("View"); tool = new JMenu("Tool"); help = new JMenu("Help"); - + JMenuItem menuItem; - + // FILE menuItem = file.add(mgui.actions[TGUIAction.ACT_NEW]); menuItem.addMouseListener(mgui.mouseHandler); @@ -98,30 +98,30 @@ public class JMenuBarTurtle extends JMenuBar { menuItem.addMouseListener(mgui.mouseHandler); menuItem = file.add(mgui.actions[TGUIAction.ACT_SAVE_AS]); menuItem.addMouseListener(mgui.mouseHandler); - - file.addSeparator(); - - menuItem = file.add(mgui.actions[TGUIAction.ACT_MERGE]); + + file.addSeparator(); + + menuItem = file.add(mgui.actions[TGUIAction.ACT_MERGE]); menuItem.addMouseListener(mgui.mouseHandler); - + file.addSeparator(); - - menuItem = file.add(mgui.actions[TGUIAction.ACT_OPEN_TIF]); + + menuItem = file.add(mgui.actions[TGUIAction.ACT_OPEN_TIF]); menuItem.addMouseListener(mgui.mouseHandler); - - menuItem = file.add(mgui.actions[TGUIAction.ACT_SAVE_TIF]); + + menuItem = file.add(mgui.actions[TGUIAction.ACT_SAVE_TIF]); menuItem.addMouseListener(mgui.mouseHandler); - - file.addSeparator(); - - menuItem = file.add(mgui.actions[TGUIAction.ACT_OPEN_SD]); + + file.addSeparator(); + + menuItem = file.add(mgui.actions[TGUIAction.ACT_OPEN_SD]); menuItem.addMouseListener(mgui.mouseHandler); - - file.addSeparator(); - + + file.addSeparator(); + menuItem = file.add(mgui.actions[TGUIAction.ACT_SAVE_LOTOS]); menuItem.addMouseListener(mgui.mouseHandler); - + saveLastGraph = new JMenu("Save Last Graphs"); menuItem = saveLastGraph.add(mgui.actions[TGUIAction.ACT_SAVE_DTA]); menuItem.addMouseListener(mgui.mouseHandler); @@ -133,29 +133,29 @@ public class JMenuBarTurtle extends JMenuBar { menuItem.addMouseListener(mgui.mouseHandler); menuItem = saveLastGraph.add(mgui.actions[TGUIAction.ACT_SAVE_AUTPROJ]); menuItem.addMouseListener(mgui.mouseHandler); - menuItem = saveLastGraph.add(mgui.actions[TGUIAction.ACT_SAVE_AUTMODIFIED]); + menuItem = saveLastGraph.add(mgui.actions[TGUIAction.ACT_SAVE_AUTMODIFIED]); menuItem.addMouseListener(mgui.mouseHandler); file.add(saveLastGraph); - + file.addSeparator(); - + menuItem = file.add(mgui.actions[TGUIAction.ACT_IMPORT_LIB]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = file.add(mgui.actions[TGUIAction.ACT_EXPORT_LIB]); menuItem.addMouseListener(mgui.mouseHandler); - + if (ConfigurationTTool.LastOpenFileDefined) { file.addSeparator(); - + menuItem = file.add(mgui.actions[TGUIAction.ACT_OPEN_LAST]); menuItem.addMouseListener(mgui.mouseHandler); } - + file.addSeparator(); - + menuItem = file.add(mgui.actions[TGUIAction.ACT_QUIT]); menuItem.addMouseListener(mgui.mouseHandler); - + //Edit menuItem = edit.add(mgui.actions[TGUIAction.ACT_CUT]); menuItem.addMouseListener(mgui.mouseHandler); @@ -165,16 +165,16 @@ public class JMenuBarTurtle extends JMenuBar { menuItem.addMouseListener(mgui.mouseHandler); menuItem = edit.add(mgui.actions[TGUIAction.ACT_DELETE]); menuItem.addMouseListener(mgui.mouseHandler); - + edit.addSeparator(); - + menuItem = edit.add(mgui.actions[TGUIAction.ACT_BACKWARD]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = edit.add(mgui.actions[TGUIAction.ACT_FORWARD]); menuItem.addMouseListener(mgui.mouseHandler); - + edit.addSeparator(); - + menuItem = edit.add(mgui.actions[TGUIAction.ACT_FIRST_DIAG]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = edit.add(mgui.actions[TGUIAction.ACT_BACK_DIAG]); @@ -183,164 +183,164 @@ public class JMenuBarTurtle extends JMenuBar { menuItem.addMouseListener(mgui.mouseHandler); menuItem = edit.add(mgui.actions[TGUIAction.ACT_LAST_DIAG]); menuItem.addMouseListener(mgui.mouseHandler); - + // DIAGRAM - + menuItem = diagram.add(mgui.actions[TGUIAction.ACT_NEW_ANALYSIS]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = diagram.add(mgui.actions[TGUIAction.ACT_NEW_DESIGN]); menuItem.addMouseListener(mgui.mouseHandler); - + diagram.addSeparator(); - + menuItem = diagram.add(mgui.actions[TGUIAction.UML_NOTE]); menuItem.addMouseListener(mgui.mouseHandler); - + // Interaction Overview Diagram iod = new JMenu("Interaction Overview Diagram"); diagram.add(iod); - + menuItem = iod.add(mgui.actions[TGUIAction.IOD_EDIT]); menuItem.addMouseListener(mgui.mouseHandler); - + iod.addSeparator(); - + menuItem = iod.add(mgui.actions[TGUIAction.IOD_CONNECTOR]); menuItem.addMouseListener(mgui.mouseHandler); - + iod.addSeparator(); - + menuItem = iod.add(mgui.actions[TGUIAction.IOD_START]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = iod.add(mgui.actions[TGUIAction.IOD_STOP]); menuItem.addMouseListener(mgui.mouseHandler); - + iod.addSeparator(); - + menuItem = iod.add(mgui.actions[TGUIAction.IOD_REF_SD]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = iod.add(mgui.actions[TGUIAction.IOD_PARALLEL]); menuItem.addMouseListener(mgui.mouseHandler); /*menuItem = iod.add(mgui.actions[TGUIAction.IOD_SEQUENCE]); - menuItem.addMouseListener(mgui.mouseHandler); - menuItem = iod.add(mgui.actions[TGUIAction.IOD_PREEMPTION]); - menuItem.addMouseListener(mgui.mouseHandler);*/ + menuItem.addMouseListener(mgui.mouseHandler); + menuItem = iod.add(mgui.actions[TGUIAction.IOD_PREEMPTION]); + menuItem.addMouseListener(mgui.mouseHandler);*/ menuItem = iod.add(mgui.actions[TGUIAction.IOD_CHOICE]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = iod.add(mgui.actions[TGUIAction.IOD_JUNCTION]); menuItem.addMouseListener(mgui.mouseHandler); - + // Sequence Diagram sd = new JMenu("Sequence Diagram"); diagram.add(sd); - + menuItem = sd.add(mgui.actions[TGUIAction.SD_EDIT]); menuItem.addMouseListener(mgui.mouseHandler); - + sd.addSeparator(); - + menuItem = sd.add(mgui.actions[TGUIAction.SD_CONNECTOR_MESSAGE_SYNC]); menuItem.addMouseListener(mgui.mouseHandler); - + menuItem = sd.add(mgui.actions[TGUIAction.SD_CONNECTOR_MESSAGE_ASYNC]); menuItem.addMouseListener(mgui.mouseHandler); - + sd.addSeparator(); - + menuItem = sd.add(mgui.actions[TGUIAction.SD_INSTANCE]); menuItem.addMouseListener(mgui.mouseHandler); - + menuItem = sd.add(mgui.actions[TGUIAction.SD_ACTION_STATE]); menuItem.addMouseListener(mgui.mouseHandler); - + menuItem = sd.add(mgui.actions[TGUIAction.SD_COREGION]); menuItem.addMouseListener(mgui.mouseHandler); - + sd.addSeparator(); - + menuItem = sd.add(mgui.actions[TGUIAction.SD_TIMER_SETTING]); menuItem.addMouseListener(mgui.mouseHandler); - + menuItem = sd.add(mgui.actions[TGUIAction.SD_TIMER_EXPIRATION]); menuItem.addMouseListener(mgui.mouseHandler); - + menuItem = sd.add(mgui.actions[TGUIAction.SD_TIMER_CANCELLATION]); menuItem.addMouseListener(mgui.mouseHandler); - - sd.addSeparator(); - + + sd.addSeparator(); + menuItem = sd.add(mgui.actions[TGUIAction.SD_ABSOLUTE_TIME_CONSTRAINT]); menuItem.addMouseListener(mgui.mouseHandler); - + menuItem = sd.add(mgui.actions[TGUIAction.SD_RELATIVE_TIME_CONSTRAINT]); menuItem.addMouseListener(mgui.mouseHandler); - + menuItem = sd.add(mgui.actions[TGUIAction.SD_RELATIVE_TIME_CONSTRAINT_CONNECTOR]); menuItem.addMouseListener(mgui.mouseHandler); - + sd.addSeparator(); - - menuItem = sd.add(mgui.actions[TGUIAction.SD_ALIGN_INSTANCES]); + + menuItem = sd.add(mgui.actions[TGUIAction.SD_ALIGN_INSTANCES]); menuItem.addMouseListener(mgui.mouseHandler); - + // Use case diagram ucd = new JMenu("Use Case Diagram"); diagram.add(ucd); - + menuItem = ucd.add(mgui.actions[TGUIAction.UCD_EDIT]); menuItem.addMouseListener(mgui.mouseHandler); - + ucd.addSeparator(); - + menuItem = ucd.add(mgui.actions[TGUIAction.UCD_ACTOR]); menuItem.addMouseListener(mgui.mouseHandler); - + ucd.addSeparator(); - + menuItem = ucd.add(mgui.actions[TGUIAction.UCD_USECASE]); menuItem.addMouseListener(mgui.mouseHandler); - + ucd.addSeparator(); - + menuItem = ucd.add(mgui.actions[TGUIAction.UCD_CONNECTOR_ACTOR_UC]); menuItem.addMouseListener(mgui.mouseHandler); - + menuItem = ucd.add(mgui.actions[TGUIAction.UCD_CONNECTOR_INCLUDE]); menuItem.addMouseListener(mgui.mouseHandler); - + menuItem = ucd.add(mgui.actions[TGUIAction.UCD_CONNECTOR_EXTEND]); menuItem.addMouseListener(mgui.mouseHandler); - + menuItem = ucd.add(mgui.actions[TGUIAction.UCD_CONNECTOR_SPECIA]); menuItem.addMouseListener(mgui.mouseHandler); - + // CLASS DIAGRAM cd = new JMenu("Class Diagram"); diagram.add(cd); - + menuItem = cd.add(mgui.actions[TGUIAction.TCD_EDIT]); menuItem.addMouseListener(mgui.mouseHandler); - + cd.addSeparator(); - + menuItem = cd.add(mgui.actions[TGUIAction.TCD_ASSOCIATION]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = cd.add(mgui.actions[TGUIAction.TCD_ASSOCIATION_NAVIGATION]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = cd.add(mgui.actions[TGUIAction.TCD_CONNECTOR_ATTRIBUTE]); menuItem.addMouseListener(mgui.mouseHandler); - + cd.addSeparator(); - + menuItem = cd.add(mgui.actions[TGUIAction.TCD_NEW_TCLASS]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = cd.add(mgui.actions[TGUIAction.TCD_NEW_TOBJECT]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = cd.add(mgui.actions[TGUIAction.TCD_NEW_TDATA]); menuItem.addMouseListener(mgui.mouseHandler); - + cd.addSeparator(); - + menuItem = cd.add(mgui.actions[TGUIAction.TCD_PARALLEL_OPERATOR]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = cd.add(mgui.actions[TGUIAction.TCD_SYNCHRO_OPERATOR]); @@ -351,28 +351,28 @@ public class JMenuBarTurtle extends JMenuBar { menuItem.addMouseListener(mgui.mouseHandler); menuItem = cd.add(mgui.actions[TGUIAction.TCD_PREEMPTION_OPERATOR]); menuItem.addMouseListener(mgui.mouseHandler); - + // ACTIVITY DIAGRAM ad = new JMenu("Activity Diagram"); diagram.add(ad); - + menuItem = ad.add(mgui.actions[TGUIAction.AD_EDIT]); menuItem.addMouseListener(mgui.mouseHandler); - + ad.addSeparator(); - + menuItem = ad.add(mgui.actions[TGUIAction.AD_CONNECTOR]); menuItem.addMouseListener(mgui.mouseHandler); - + ad.addSeparator(); - + menuItem = ad.add(mgui.actions[TGUIAction.AD_START]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = ad.add(mgui.actions[TGUIAction.AD_STOP]); menuItem.addMouseListener(mgui.mouseHandler); - + ad.addSeparator(); - + menuItem = ad.add(mgui.actions[TGUIAction.AD_ACTION_STATE]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = ad.add(mgui.actions[TGUIAction.AD_PARALLEL]); @@ -385,9 +385,9 @@ public class JMenuBarTurtle extends JMenuBar { menuItem.addMouseListener(mgui.mouseHandler); menuItem = ad.add(mgui.actions[TGUIAction.AD_JUNCTION]); menuItem.addMouseListener(mgui.mouseHandler); - + ad.addSeparator(); - + menuItem = ad.add(mgui.actions[TGUIAction.AD_DETERMINISTIC_DELAY]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = ad.add(mgui.actions[TGUIAction.AD_NON_DETERMINISTIC_DELAY]); @@ -398,75 +398,75 @@ public class JMenuBarTurtle extends JMenuBar { menuItem.addMouseListener(mgui.mouseHandler); menuItem = ad.add(mgui.actions[TGUIAction.AD_TIME_LIMITED_OFFER_WITH_LATENCY]); menuItem.addMouseListener(mgui.mouseHandler); - + // V&V menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_MODEL_CHECKING]); menuItem.addMouseListener(mgui.mouseHandler); - + vAndV.addSeparator(); - + menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_RTLOTOS]); menuItem.addMouseListener(mgui.mouseHandler); - - if (MainGUI.lotosOn) { - menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_LOTOS]); - menuItem.addMouseListener(mgui.mouseHandler); - } - - if (MainGUI.uppaalOn) { - menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_UPPAAL]); - menuItem.addMouseListener(mgui.mouseHandler); - } - + + if (MainGUI.lotosOn) { + menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_LOTOS]); + menuItem.addMouseListener(mgui.mouseHandler); + } + + if (MainGUI.uppaalOn) { + menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_UPPAAL]); + menuItem.addMouseListener(mgui.mouseHandler); + } + vAndV.addSeparator(); - + menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_DESIGN]); menuItem.addMouseListener(mgui.mouseHandler); - + /*vAndV.addSeparator(); - - menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_JAVA]); - menuItem.addMouseListener(mgui.mouseHandler);*/ - + + menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_JAVA]); + menuItem.addMouseListener(mgui.mouseHandler);*/ + vAndV.addSeparator(); - + menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_CHECKCODE]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_SIMULATION]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VALIDATION]); menuItem.addMouseListener(mgui.mouseHandler); - + vAndV.addSeparator(); menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_PROJECTION]); menuItem.addMouseListener(mgui.mouseHandler); - menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GRAPH_MODIFICATION]); + menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GRAPH_MODIFICATION]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_BISIMULATION]); menuItem.addMouseListener(mgui.mouseHandler); - menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_BISIMULATION_CADP]); + menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_BISIMULATION_CADP]); menuItem.addMouseListener(mgui.mouseHandler); - + vAndV.addSeparator(); menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_STAT_AUT]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_STAT_AUTPROJ]); menuItem.addMouseListener(mgui.mouseHandler); - menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_STAT_AUTDIPLODOCUS]); + menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_STAT_AUTDIPLODOCUS]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_STAT_SAVED_AUT]); menuItem.addMouseListener(mgui.mouseHandler); - - vAndV.addSeparator(); + + vAndV.addSeparator(); menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_AUT]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_AUTPROJ]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_SAVED_AUT]); menuItem.addMouseListener(mgui.mouseHandler); - - vAndV.addSeparator(); - menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_AVATAR_SIM]); + + vAndV.addSeparator(); + menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_AVATAR_SIM]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_AVATAR_FV_UPPAAL]); menuItem.addMouseListener(mgui.mouseHandler); @@ -474,32 +474,32 @@ public class JMenuBarTurtle extends JMenuBar { menuItem.addMouseListener(mgui.mouseHandler); menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_AVATAR_FV_STATICANALYSIS]); menuItem.addMouseListener(mgui.mouseHandler); - + /*vAndV.addSeparator(); - menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_DEADLOCK_SEEKER_AUT]); - menuItem.addMouseListener(mgui.mouseHandler); - menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_DEADLOCK_SEEKER_SAVED_AUT]); - menuItem.addMouseListener(mgui.mouseHandler);*/ - + menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_DEADLOCK_SEEKER_AUT]); + menuItem.addMouseListener(mgui.mouseHandler); + menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_DEADLOCK_SEEKER_SAVED_AUT]); + menuItem.addMouseListener(mgui.mouseHandler);*/ + // Code generation - + menuItem = codeG.add(mgui.actions[TGUIAction.ACT_GEN_JAVA]); menuItem.addMouseListener(mgui.mouseHandler); - + if (MainGUI.systemcOn) { menuItem = codeG.add(mgui.actions[TGUIAction.ACT_GEN_SYSTEMC]); menuItem.addMouseListener(mgui.mouseHandler); - - menuItem = codeG.add(mgui.actions[TGUIAction.ACT_GEN_TMLTXT]); + + menuItem = codeG.add(mgui.actions[TGUIAction.ACT_GEN_TMLTXT]); menuItem.addMouseListener(mgui.mouseHandler); - menuItem = codeG.add(mgui.actions[TGUIAction.ACT_GEN_CCODE]); + menuItem = codeG.add(mgui.actions[TGUIAction.ACT_GEN_CCODE]); menuItem.addMouseListener(mgui.mouseHandler); } - + menuItem = codeG.add(mgui.actions[TGUIAction.ACT_AVATAR_EXECUTABLE_GENERATION]); menuItem.addMouseListener(mgui.mouseHandler); - + // View menuItem = view.add(mgui.actions[TGUIAction.ACT_VIEW_BIRDEYES_EMB]); menuItem.addMouseListener(mgui.mouseHandler); @@ -529,32 +529,32 @@ public class JMenuBarTurtle extends JMenuBar { menuItem.addMouseListener(mgui.mouseHandler); menuItem = view.add(mgui.actions[TGUIAction.ACT_VIEW_RGAUTPROJDOT]); menuItem.addMouseListener(mgui.mouseHandler); - menuItem = view.add(mgui.actions[TGUIAction.ACT_VIEW_MODIFIEDAUTDOT]); + menuItem = view.add(mgui.actions[TGUIAction.ACT_VIEW_MODIFIEDAUTDOT]); menuItem.addMouseListener(mgui.mouseHandler); - - view.addSeparator(); - menuItem = view.add(mgui.actions[TGUIAction.ACT_VIEW_RG_DIPLODOCUS]); + + view.addSeparator(); + menuItem = view.add(mgui.actions[TGUIAction.ACT_VIEW_RG_DIPLODOCUS]); menuItem.addMouseListener(mgui.mouseHandler); - + view.addSeparator(); menuItem = view.add(mgui.actions[TGUIAction.ACT_VIEW_SAVED_LOT]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = view.add(mgui.actions[TGUIAction.ACT_VIEW_SAVED_DOT]); menuItem.addMouseListener(mgui.mouseHandler); - + /*if (MainGUI.systemcOn) { - view.addSeparator(); - menuItem = view.add(mgui.actions[TGUIAction.ACT_VIEW_WAVE]); - menuItem.addMouseListener(mgui.mouseHandler); - view.addSeparator(); - menugraph = new JMenu("View generated automata"); - view.add(menugraph); - }*/ - + view.addSeparator(); + menuItem = view.add(mgui.actions[TGUIAction.ACT_VIEW_WAVE]); + menuItem.addMouseListener(mgui.mouseHandler); + view.addSeparator(); + menugraph = new JMenu("View generated automata"); + view.add(menugraph); + }*/ + // Tool capture = new JMenu("Capture"); tool.add(capture); - + menuItem = capture.add(mgui.actions[TGUIAction.ACT_SCREEN_CAPTURE]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = capture.add(mgui.actions[TGUIAction.ACT_TTOOL_WINDOW_CAPTURE]); @@ -567,8 +567,8 @@ public class JMenuBarTurtle extends JMenuBar { menuItem.addMouseListener(mgui.mouseHandler); menuItem = capture.add(mgui.actions[TGUIAction.ACT_SELECTED_CAPTURE]); menuItem.addMouseListener(mgui.mouseHandler); - - + + ontologies = new JMenu("Ontologies"); tool.add(ontologies); menuItem = ontologies.add(mgui.actions[TGUIAction.ACT_GENERATE_ONTOLOGIES_CURRENT_DIAGRAM]); @@ -577,23 +577,23 @@ public class JMenuBarTurtle extends JMenuBar { menuItem.addMouseListener(mgui.mouseHandler); menuItem = ontologies.add(mgui.actions[TGUIAction.ACT_GENERATE_ONTOLOGIES_ALL_DIAGRAMS]); menuItem.addMouseListener(mgui.mouseHandler); - - menuItem = tool.add(mgui.actions[TGUIAction.ACT_GEN_DOC]); - menuItem.addMouseListener(mgui.mouseHandler); - - menuItem = tool.add(mgui.actions[TGUIAction.ACT_GEN_DOC_REQ]); - menuItem.addMouseListener(mgui.mouseHandler); - - if ((ConfigurationTTool.ExternalCommand1.length() > 0) && (ConfigurationTTool.ExternalCommand1Host.length() > 0)) { - menuItem = tool.add(mgui.actions[TGUIAction.EXTERNAL_ACTION_1]); - menuItem.addMouseListener(mgui.mouseHandler); - menuItem.setToolTipText(ConfigurationTTool.ExternalCommand1); + + menuItem = tool.add(mgui.actions[TGUIAction.ACT_GEN_DOC]); + menuItem.addMouseListener(mgui.mouseHandler); + + menuItem = tool.add(mgui.actions[TGUIAction.ACT_GEN_DOC_REQ]); + menuItem.addMouseListener(mgui.mouseHandler); + + if ((ConfigurationTTool.ExternalCommand1.length() > 0) && (ConfigurationTTool.ExternalCommand1Host.length() > 0)) { + menuItem = tool.add(mgui.actions[TGUIAction.EXTERNAL_ACTION_1]); + menuItem.addMouseListener(mgui.mouseHandler); + menuItem.setToolTipText(ConfigurationTTool.ExternalCommand1); } - + if ((ConfigurationTTool.ExternalCommand2.length() > 0) && (ConfigurationTTool.ExternalCommand2Host.length() > 0)) { - menuItem = tool.add(mgui.actions[TGUIAction.EXTERNAL_ACTION_2]); - menuItem.addMouseListener(mgui.mouseHandler); - menuItem.setToolTipText(ConfigurationTTool.ExternalCommand2); + menuItem = tool.add(mgui.actions[TGUIAction.EXTERNAL_ACTION_2]); + menuItem.addMouseListener(mgui.mouseHandler); + menuItem.setToolTipText(ConfigurationTTool.ExternalCommand2); } menuItem = tool.add(mgui.actions[TGUIAction.ACT_EXTERNAL_SEARCH]); @@ -601,19 +601,19 @@ public class JMenuBarTurtle extends JMenuBar { // HELP - menuItem = help.add(mgui.actions[TGUIAction.ACT_TTOOL_CONFIGURATION]); + menuItem = help.add(mgui.actions[TGUIAction.ACT_TTOOL_CONFIGURATION]); menuItem.addMouseListener(mgui.mouseHandler); - help.addSeparator(); + help.addSeparator(); menuItem = help.add(mgui.actions[TGUIAction.ACT_TURTLE_DOCUMENTATION]); menuItem.addMouseListener(mgui.mouseHandler); - menuItem = help.add(mgui.actions[TGUIAction.ACT_DIPLODOCUS_DOCUMENTATION]); + menuItem = help.add(mgui.actions[TGUIAction.ACT_DIPLODOCUS_DOCUMENTATION]); menuItem.addMouseListener(mgui.mouseHandler); help.addSeparator(); menuItem = help.add(mgui.actions[TGUIAction.ACT_TURTLE_WEBSITE]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = help.add(mgui.actions[TGUIAction.ACT_ABOUT]); menuItem.addMouseListener(mgui.mouseHandler); - + // MenuBar add(file); add(edit); @@ -625,4 +625,3 @@ public class JMenuBarTurtle extends JMenuBar { add(help); } } // Class - diff --git a/src/ui/MainGUI.java b/src/ui/MainGUI.java index 4912e2feca..8806016abd 100755 --- a/src/ui/MainGUI.java +++ b/src/ui/MainGUI.java @@ -1197,6 +1197,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if (index == -1) { index = tabs.size(); } + + TraceManager.addDev("New avatar methodo panel"); AvatarMethodologyPanel dp = new AvatarMethodologyPanel(this); tabs.add(index, dp); mainTabbedPane.add(dp.tabbedPane, index); @@ -1212,6 +1214,26 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return index; } + private int addSysmlsecMethodologyPanel(String name, int index, boolean addDefaultElements) { + if (index == -1) { + index = tabs.size(); + } + TraceManager.addDev("New SysMLSec Methodopanel"); + SysmlsecMethodologyPanel dp = new SysmlsecMethodologyPanel(this); + tabs.add(index, dp); + mainTabbedPane.add(dp.tabbedPane, index); + mainTabbedPane.setToolTipTextAt(index, "Open SysML-Sec methodology"); + mainTabbedPane.setTitleAt(index, name); + mainTabbedPane.setIconAt(index, IconManager.imgic99); + //mainTabbedPane.addTab(name, IconManager.imgic14, dp.tabbedPane, "Opens design diagrams"); + dp.init(name); + if (addDefaultElements) { + dp.initElements(); + } + //ystem.out.println("Design added"); + return index; + } + private int addTMLComponentDesignPanel(String name, int index) { if (index == -1) { @@ -1574,6 +1596,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return index; } + public int createSysmlsecMethodology(String name) { + int index = addSysmlsecMethodologyPanel(name, -1, false); + mainTabbedPane.setSelectedIndex(index); + return index; + } + public int createTMLDesign(String name) { int index = addTMLDesignPanel(name, -1); mainTabbedPane.setSelectedIndex(index); @@ -1915,6 +1943,15 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe //frame.repaint(); } + public void newSysmlsecMethodology() { + //TraceManager.addDev("NEW DESIGN"); + addSysmlsecMethodologyPanel("SysMLSec_Methodology", -1, true); + ((TURTLEPanel)tabs.elementAt(tabs.size()-1)).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size()-1); + //paneAction(null); + //frame.repaint(); + } + public void newTMLComponentDesign() { //TraceManager.addDev("NEW DESIGN"); addTMLComponentDesignPanel("DIPLODOCUS_C_Design", -1); @@ -5499,6 +5536,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe tp.tabbedPane.setTitleAt(0, name); } + public void setSysmlsecMethodologyDiagramName(int indexDesign, String name) { + TURTLEPanel tp = (TURTLEPanel)(tabs.elementAt(indexDesign)); + tp.tabbedPane.setTitleAt(0, name); + } + public void setTMLTaskDiagramName(int indexDesign, String name) { TURTLEPanel tp = (TURTLEPanel)(tabs.elementAt(indexDesign)); tp.tabbedPane.setTitleAt(0, name); @@ -8616,7 +8658,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe private JPopupMenu menu; private JMenuItem rename, remove, moveRight, moveLeft, newDesign, newAnalysis, newDeployment, newRequirement, newTMLDesign, newTMLComponentDesign, newTMLArchi, newProactiveDesign, newTURTLEOSDesign, - newNCDesign, sort, clone, newAttackTree, newAVATARBD, newAVATARRequirement, newMAD, newTMLCP, newTMLMethodo, newAvatarMethodo, newAVATARDD; + newNCDesign, sort, clone, newAttackTree, newAVATARBD, newAVATARRequirement, newMAD, newTMLCP, newTMLMethodo, newAvatarMethodo, newAVATARDD, newSysmlsecMethodo; private JMenuItem newAVATARAnalysis; public PopupListener(MainGUI _mgui) { @@ -8661,7 +8703,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe newTMLDesign = createMenuItem("New Partitioning - Design"); newTMLComponentDesign = createMenuItem("New Partitioning - functional view"); - newTMLArchi = createMenuItem("New Partitioning - Architecture"); + newTMLArchi = createMenuItem("New Partitioning - Architecture and Mapping"); newTMLCP = createMenuItem("New Partitioning - Communication Pattern"); newProactiveDesign = createMenuItem("New Proactive Design"); newTURTLEOSDesign = createMenuItem("New TURTLE-OS Design"); @@ -8672,6 +8714,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe newAVATARBD = createMenuItem("New Design"); newAVATARDD = createMenuItem("New Deployment Diagram"); newAvatarMethodo = createMenuItem("New AVATAR Methodology"); + newSysmlsecMethodo = createMenuItem("New SysML-Sec Methodology"); menu = new JPopupMenu("Views"); menu.add(moveLeft); @@ -8734,6 +8777,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if (avatarOn) { menu.add(newAvatarMethodo); + menu.add(newSysmlsecMethodo); } menu.addSeparator(); @@ -8839,6 +8883,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe mgui.newDiplodocusMethodology(); } else if (e.getSource() == newAvatarMethodo) { mgui.newAvatarMethodology(); + } else if (e.getSource() == newSysmlsecMethodo) { + mgui.newSysmlsecMethodology(); } else if (ac.equals("New DIPLODOCUS Design")) { mgui.newTMLDesign(); } else if (e.getSource() == newTMLComponentDesign) { diff --git a/src/ui/SysmlsecMethodologyPanel.java b/src/ui/SysmlsecMethodologyPanel.java new file mode 100755 index 0000000000..3d267dbedf --- /dev/null +++ b/src/ui/SysmlsecMethodologyPanel.java @@ -0,0 +1,229 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + + ludovic.apvrille AT enst.fr + + This software is a computer program whose purpose is to allow the + edition of TURTLE analysis, design and deployment diagrams, to + allow the generation of RT-LOTOS or Java code from this diagram, + and at last to allow the analysis of formal validation traces + obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + from INRIA Rhone-Alpes. + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited + liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + /** + * Class SysmlsecMethodologyPanel + * Managenemt of the sysmlsec methodology panels + * Creation: 26/0&/2016 + * @version 1.1 26/01/2016 + * @author Ludovic APVRILLE + * @see MainGUI + */ + +package ui; + +import java.awt.*; +import javax.swing.*; +import javax.swing.event.*; +import ui.sysmlsecmethodology.*; + + +import java.util.*; + +public class SysmlsecMethodologyPanel extends TURTLEPanel { + public SysmlsecMethodologyDiagramPanel dmd; + + public SysmlsecMethodologyPanel(MainGUI _mgui) { + super(_mgui); + + tabbedPane = new JTabbedPane(); + UIManager.put("TabbedPane.tabAreaBackground", _mgui.BACK_COLOR); + UIManager.put("TabbedPane.selected", _mgui.BACK_COLOR); + SwingUtilities.updateComponentTreeUI(tabbedPane); + //tabbedPane.setOpaque(true); + + cl = new ChangeListener() { + public void stateChanged(ChangeEvent e){ + mgui.paneDiplodocusMethodologyAction(e); + } + }; + tabbedPane.addChangeListener(cl); + tabbedPane.addMouseListener(new TURTLEPanelPopupListener(this, mgui)); + + } + + // Put the methodology + public void initElements() { + TGComponent tgc1 = dmd.addComponent(150, 100, TGComponentManager.SYSMLSEC_METHODOLOGY_REF_ASSUMPTIONS, false); + TGComponent tgc2 = dmd.addComponent(250, 200, TGComponentManager.SYSMLSEC_METHODOLOGY_REF_REQUIREMENT, false); + TGComponent tgc3 = dmd.addComponent(350, 300, TGComponentManager.SYSMLSEC_METHODOLOGY_REF_ANALYSIS, false); + TGComponent tgc4 = dmd.addComponent(450, 400, TGComponentManager.SYSMLSEC_METHODOLOGY_REF_DESIGN, false); + TGComponent tgc5 = dmd.addComponent(550, 500, TGComponentManager.SYSMLSEC_METHODOLOGY_REF_PROTOTYPE, false); + TGComponent tgc6 = dmd.addComponent(200, 400, TGComponentManager.SYSMLSEC_METHODOLOGY_REF_PROPERTIES, false); + + + //Connectors + + // Assumptions -> reqs + TGConnectingPoint p1, p2; + p1 = tgc1.getTGConnectingPointAtIndex(0); + p2 = tgc2.getTGConnectingPointAtIndex(0); + Vector listPoint = new Vector(); + Point p = new Point(210, 235); + listPoint.add(p); + TGConnector tgco = TGComponentManager.addConnector(p1.getX(), p1.getY(), TGComponentManager.SYSMLSEC_METHODOLOGY_CONNECTOR, dmd, p1, p2, listPoint); + p1.setFree(false); + p2.setFree(false); + dmd.getComponentList().add(0, tgco); + + // Reqs -> Analysis + p1 = tgc2.getTGConnectingPointAtIndex(1); + p2 = tgc3.getTGConnectingPointAtIndex(0); + listPoint = new Vector(); + p = new Point(310, 335); + listPoint.add(p); + tgco = TGComponentManager.addConnector(p1.getX(), p1.getY(), TGComponentManager.SYSMLSEC_METHODOLOGY_CONNECTOR, dmd, p1, p2, listPoint); + p1.setFree(false); + p2.setFree(false); + dmd.getComponentList().add(0, tgco); + + // Analysis -> Design + p1 = tgc3.getTGConnectingPointAtIndex(1); + p2 = tgc4.getTGConnectingPointAtIndex(0); + listPoint = new Vector(); + p = new Point(410, 435); + listPoint.add(p); + tgco = TGComponentManager.addConnector(p1.getX(), p1.getY(), TGComponentManager.SYSMLSEC_METHODOLOGY_CONNECTOR, dmd, p1, p2, listPoint); + p1.setFree(false); + p2.setFree(false); + dmd.getComponentList().add(0, tgco); + + // Design -> Prototyping + p1 = tgc4.getTGConnectingPointAtIndex(1); + p2 = tgc5.getTGConnectingPointAtIndex(0); + listPoint = new Vector(); + p = new Point(510, 535); + listPoint.add(p); + tgco = TGComponentManager.addConnector(p1.getX(), p1.getY(), TGComponentManager.SYSMLSEC_METHODOLOGY_CONNECTOR, dmd, p1, p2, listPoint); + p1.setFree(false); + p2.setFree(false); + dmd.getComponentList().add(0, tgco); + + // Reqs -> Prop + p1 = tgc2.getTGConnectingPointAtIndex(2); + p2 = tgc6.getTGConnectingPointAtIndex(0); + listPoint = new Vector(); + tgco = TGComponentManager.addConnector(p1.getX(), p1.getY(), TGComponentManager.SYSMLSEC_METHODOLOGY_CONNECTOR, dmd, p1, p2, listPoint); + p1.setFree(false); + p2.setFree(false); + dmd.getComponentList().add(0, tgco); + + + } + + public void init() { + init("SysML-Sec methodology"); + } + + public void init(String name) { + addSysmlsecMethodologyDiagram(name); + + // Requirement Diagram toolbar + //addRequirementDiagram("Requirement Diagram"); + + //jsp.setVisible(true); + } + + public boolean addSysmlsecMethodologyDiagram(String s) { + SysmlsecMethodologyDiagramToolbar dmdt = new SysmlsecMethodologyDiagramToolbar(mgui); + toolbars.add(dmdt); + + toolBarPanel = new JPanel(); + //toolBarPanel.setBackground(Color.red); + toolBarPanel.setLayout(new BorderLayout()); + //toolBarPanel.setBackground(ColorManager.MainTabbedPaneSelect); + + //Class diagram + dmd = new SysmlsecMethodologyDiagramPanel(mgui, dmdt); + dmd.setName(s); + dmd.tp = this; + tdp = dmd; + panels.add(dmd); + JScrollDiagramPanel jsp = new JScrollDiagramPanel(dmd); + dmd.jsp = jsp; + jsp.setWheelScrollingEnabled(true); + jsp.getVerticalScrollBar().setUnitIncrement(mgui.INCREMENT); + toolBarPanel.add(dmdt, BorderLayout.NORTH); + toolBarPanel.add(jsp, BorderLayout.CENTER); + tabbedPane.addTab(s, IconManager.imgic99, toolBarPanel, "Opens SysMLSec methodology"); + tabbedPane.setSelectedIndex(0); + JPanel toolBarPanel = new JPanel(); + toolBarPanel.setLayout(new BorderLayout()); + + //TGComponent tgc = TGComponentManager.addComponent(100, 100, TGComponentManager.DIPLODODUSMETHODOLOGY_REF_APPLICATION, dmd); + mgui.changeMade(dmd, TDiagramPanel.NEW_COMPONENT); + + return true; + } + + + + + public String saveHeaderInXml() { + return "<Modeling type=\"Sysmlsec Methodology\" nameTab=\"" + mgui.getTabName(this) + "\" >\n"; + } + + public String saveTailInXml() { + return "</Modeling>\n\n\n"; + } + + public String toString() { + return mgui.getTitleAt(this) + " (SysMLSec Methodology)"; + } + + public boolean removeEnabled(int index) { + if (panels.size() > 1) { + return true; + } + return false; + } + + public boolean renameEnabled(int index) { + if (panels.size() == 0) { + return false; + } + + + return true; + } + + public boolean isSysmlsecMethodologyEnabled() { + return true; + } + + +} diff --git a/src/ui/TDiagramPanel.java b/src/ui/TDiagramPanel.java index 05548c7be5..06e748abca 100755 --- a/src/ui/TDiagramPanel.java +++ b/src/ui/TDiagramPanel.java @@ -294,7 +294,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { } public boolean isDrawingMain() { - return drawingMain; + return drawingMain; } public void updateComponentsAfterZoom() { @@ -407,7 +407,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { public void paintMycomponents(Graphics g, boolean b, double w, double h) { lastGraphics = g; - drawingMain = b; + drawingMain = b; //TraceManager.addDev("Nb of components: " + componentList.size()); @@ -760,11 +760,11 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { //state = tgc.getState(); tgcTmp = tgc.isOnMeHL(x, y); if (tgcTmp != null) { - if (tgcTmp instanceof AvatarBDPragma){ - this.setToolTipText("The lock shows status of weak and strong authenticity. Green: Proved True, Red: Proved False, Grey: Cannot be proved"); - } else { - this.setToolTipText(""); - } + if (tgcTmp instanceof AvatarBDPragma){ + this.setToolTipText("The lock shows status of weak and strong authenticity. Green: Proved True, Red: Proved False, Grey: Cannot be proved"); + } else { + this.setToolTipText(""); + } if (!pointedElementFound) { componentPointed = tgcTmp; tgc.setState(TGState.POINTED); @@ -1094,7 +1094,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { public void finishAddingConnector(TGConnectingPoint p2) { TGConnector tgco = TGComponentManager.addConnector(p1.getX(), p1.getY(), mgui.getIdButtonSelected(), this, p1, p2, listPoint); if (tgco != null) { - TraceManager.addDev("Adding connector"); + TraceManager.addDev("Adding connector"); p2.setFree(false); componentList.add(0, tgco); if (tgco instanceof SpecificActionAfterAdd) { @@ -1102,10 +1102,10 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { } stopAddingConnector(false); p1.setFree(false); - p1 = null; - p2 = null; + p1 = null; + p2 = null; } else { - TraceManager.addDev("Cancel adding connector"); + TraceManager.addDev("Cancel adding connector"); p2.setFree(true); stopAddingConnector(true); p1.setFree(true); @@ -1135,10 +1135,10 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { // Multi-select public void setSelectingComponents(int x, int y) { - x = Math.min(Math.max( (int)(Math.floor(minLimit*zoom)), x), (int)(Math.ceil(maxX*zoom))); - y = Math.min(Math.max( (int)(Math.floor(minLimit*zoom)), y), (int)(Math.ceil(maxY*zoom))); - // x = Math.min(Math.max(minLimit*zoom, x), maxX*zoom); - //y = Math.min(Math.max(minLimit*zoom, y), maxY*zoom); + x = Math.min(Math.max( (int)(Math.floor(minLimit*zoom)), x), (int)(Math.ceil(maxX*zoom))); + y = Math.min(Math.max( (int)(Math.floor(minLimit*zoom)), y), (int)(Math.ceil(maxY*zoom))); + // x = Math.min(Math.max(minLimit*zoom, x), maxX*zoom); + //y = Math.min(Math.max(minLimit*zoom, y), maxY*zoom); initSelectX = x; currentSelectX = x; initSelectY = y; @@ -1146,9 +1146,9 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { } public void updateSelectingComponents(int x, int y) { - x = Math.min(Math.max( (int)(Math.floor(minLimit*zoom)), x), (int)(Math.ceil(maxX*zoom))); - y = Math.min(Math.max( (int)(Math.floor(minLimit*zoom)), y), (int)(Math.ceil(maxY*zoom))); - //x = Math.min(Math.max(minLimit, x), maxX); + x = Math.min(Math.max( (int)(Math.floor(minLimit*zoom)), x), (int)(Math.ceil(maxX*zoom))); + y = Math.min(Math.max( (int)(Math.floor(minLimit*zoom)), y), (int)(Math.ceil(maxY*zoom))); + //x = Math.min(Math.max(minLimit, x), maxX); //y = Math.min(Math.max(minLimit, y), maxY); currentSelectX = x; currentSelectY = y; @@ -1440,7 +1440,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { componentMenu.add(clone); componentMenu.add(bringFront); componentMenu.add(bringBack); - componentMenu.add(enableDisable); + componentMenu.add(enableDisable); componentMenu.add(makeSquare); componentMenu.addSeparator(); componentMenu.add(attach); @@ -1449,8 +1449,8 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { componentMenu.add(hide); componentMenu.add(unhide); componentMenu.addSeparator(); - componentMenu.add(setAsCryptoBlock); - componentMenu.add(setAsRegularBlock); + componentMenu.add(setAsCryptoBlock); + componentMenu.add(setAsRegularBlock); componentMenu.add(setJavaCode); componentMenu.add(removeJavaCode); componentMenu.add(setInternalComment); @@ -1512,7 +1512,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { clone = new JMenuItem("Clone"); clone.addActionListener(menuAL); - enableDisable = new JMenuItem("Enable/Disable"); + enableDisable = new JMenuItem("Enable/Disable"); enableDisable.addActionListener(menuAL); bringFront = new JMenuItem("Bring to front"); @@ -1537,10 +1537,10 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { unhide.addActionListener(menuAL); - setAsCryptoBlock = new JMenuItem("Set as crypto block"); + setAsCryptoBlock = new JMenuItem("Set as crypto block"); setAsCryptoBlock.addActionListener(menuAL); - setAsRegularBlock = new JMenuItem("Set as regular block"); + setAsRegularBlock = new JMenuItem("Set as regular block"); setAsRegularBlock.addActionListener(menuAL); setJavaCode = new JMenuItem("Set Java code"); @@ -1628,10 +1628,10 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { repaint(); return; } - - if (e.getSource() == enableDisable) { - componentPopup.setEnabled(!componentPopup.isEnabled()); - getGUI().changeMade(this, CHANGE_VALUE_COMPONENT); + + if (e.getSource() == enableDisable) { + componentPopup.setEnabled(!componentPopup.isEnabled()); + getGUI().changeMade(this, CHANGE_VALUE_COMPONENT); repaint(); return; } @@ -1708,20 +1708,20 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { return; } - if ((e.getSource() == setAsCryptoBlock) || (e.getSource() == setAsRegularBlock)) { - - if (componentPopup instanceof AvatarBDBlock) { - AvatarBDBlock bd = (AvatarBDBlock) componentPopup; - if (bd.isCryptoBlock()) { - bd.removeCryptoElements(); - } else { - bd.addCryptoElements(); - } - repaint(); - return; - } - } - + if ((e.getSource() == setAsCryptoBlock) || (e.getSource() == setAsRegularBlock)) { + + if (componentPopup instanceof AvatarBDBlock) { + AvatarBDBlock bd = (AvatarBDBlock) componentPopup; + if (bd.isCryptoBlock()) { + bd.removeCryptoElements(); + } else { + bd.addCryptoElements(); + } + repaint(); + return; + } + } + if (e.getSource() == removeJavaCode) { componentPopup.setPreJavaCode(null); @@ -1916,7 +1916,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { clone.setEnabled(false); } - if (componentPointed instanceof CanBeDisabled) { + if (componentPointed instanceof CanBeDisabled) { /*if (componentPointed.hasFather()) { clone.setEnabled(false); } else {*/ @@ -1966,14 +1966,14 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { removeJavaCode.setEnabled(false); } - if (componentPointed instanceof AvatarBDBlock) { - AvatarBDBlock block = (AvatarBDBlock)componentPointed; - setAsCryptoBlock.setEnabled(!block.isCryptoBlock()); - setAsRegularBlock.setEnabled(block.isCryptoBlock()); - } else { - setAsRegularBlock.setEnabled(false); - setAsCryptoBlock.setEnabled(false); - } + if (componentPointed instanceof AvatarBDBlock) { + AvatarBDBlock block = (AvatarBDBlock)componentPointed; + setAsCryptoBlock.setEnabled(!block.isCryptoBlock()); + setAsRegularBlock.setEnabled(block.isCryptoBlock()); + } else { + setAsRegularBlock.setEnabled(false); + setAsCryptoBlock.setEnabled(false); + } if (componentPointed instanceof EmbeddedComment) { @@ -2259,7 +2259,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { public int getMaxX() { //return maxX; - return (int)(Math.ceil(maxX * zoom)); + return (int)(Math.ceil(maxX * zoom)); } public int getMinX() { @@ -2267,7 +2267,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { } public int getMinY() { - return (int)(Math.floor(minLimit*zoom)); + return (int)(Math.floor(minLimit*zoom)); //return minLimit*zoom; } diff --git a/src/ui/TGComponentManager.java b/src/ui/TGComponentManager.java index 9c222ff4bc..d282bd87a0 100755 --- a/src/ui/TGComponentManager.java +++ b/src/ui/TGComponentManager.java @@ -40,7 +40,7 @@ * Class TGComponentManager * Definition and creation of all possible graphical components of TTool * Creation: 21/12/2003 - * @version 1.2 03/06/2015 + * @version 1.3 27/01/2016 * @author Ludovic APVRILLE, Andrea ENRICI * @see */ @@ -90,6 +90,8 @@ import ui.avatarpd.*; import ui.avatarcd.*; // Context Diagram import ui.avatarad.*; // Activity Diagram +import ui.sysmlsecmethodology.*; + public class TGComponentManager { public static final int NONE = -1; @@ -456,6 +458,16 @@ public class TGComponentManager { public static final int AVATARMETHODOLOGY_DIAGRAM_NAME = 5607; public static final int AVATARMETHODOLOGY_CONNECTOR = 5608; + // SysML-Sec Methodology Diagrams at 5700 + public static final int SYSMLSEC_METHODOLOGY_REF_ASSUMPTIONS = 5701; + public static final int SYSMLSEC_METHODOLOGY_REF_REQUIREMENT = 5702; + public static final int SYSMLSEC_METHODOLOGY_REF_ANALYSIS = 5703; + public static final int SYSMLSEC_METHODOLOGY_REF_DESIGN = 5704; + public static final int SYSMLSEC_METHODOLOGY_REF_PROPERTIES = 5705; + public static final int SYSMLSEC_METHODOLOGY_REF_PROTOTYPE = 5706; + public static final int SYSMLSEC_METHODOLOGY_DIAGRAM_NAME = 5707; + public static final int SYSMLSEC_METHODOLOGY_CONNECTOR = 5708; + public static final int EDIT = -1; public static final int COMPONENT = 0; @@ -672,6 +684,29 @@ public class TGComponentManager { tgc = new AvatarMethodologyDiagramName(x, y, tdp.getMinX(), tdp.getMaxX(), tdp.getMinY(), tdp.getMaxY(), false, null, tdp); break; + //SysML-Sec Methodology + case SYSMLSEC_METHODOLOGY_REF_ASSUMPTIONS: + tgc = new SysmlsecMethodologyReferenceToAssumptions(x, y, tdp.getMinX(), tdp.getMaxX(), tdp.getMinY(), tdp.getMaxY(), false, null, tdp); + break; + case SYSMLSEC_METHODOLOGY_REF_REQUIREMENT: + tgc = new SysmlsecMethodologyReferenceToRequirement(x, y, tdp.getMinX(), tdp.getMaxX(), tdp.getMinY(), tdp.getMaxY(), false, null, tdp); + break; + case SYSMLSEC_METHODOLOGY_REF_ANALYSIS: + tgc = new SysmlsecMethodologyReferenceToAnalysis(x, y, tdp.getMinX(), tdp.getMaxX(), tdp.getMinY(), tdp.getMaxY(), false, null, tdp); + break; + case SYSMLSEC_METHODOLOGY_REF_DESIGN: + tgc = new SysmlsecMethodologyReferenceToDesign(x, y, tdp.getMinX(), tdp.getMaxX(), tdp.getMinY(), tdp.getMaxY(), false, null, tdp); + break; + case SYSMLSEC_METHODOLOGY_REF_PROPERTIES: + tgc = new SysmlsecMethodologyReferenceToProperties(x, y, tdp.getMinX(), tdp.getMaxX(), tdp.getMinY(), tdp.getMaxY(), false, null, tdp); + break; + case SYSMLSEC_METHODOLOGY_REF_PROTOTYPE: + tgc = new SysmlsecMethodologyReferenceToPrototype(x, y, tdp.getMinX(), tdp.getMaxX(), tdp.getMinY(), tdp.getMaxY(), false, null, tdp); + break; + case SYSMLSEC_METHODOLOGY_DIAGRAM_NAME: + tgc = new SysmlsecMethodologyDiagramName(x, y, tdp.getMinX(), tdp.getMaxX(), tdp.getMinY(), tdp.getMaxY(), false, null, tdp); + break; + // Others @@ -1272,6 +1307,24 @@ public class TGComponentManager { } else if (tgc instanceof AvatarMethodologyConnector) { return AVATARMETHODOLOGY_CONNECTOR; + // SysML-Sec Methodology + } else if (tgc instanceof SysmlsecMethodologyReferenceToAssumptions) { + return SYSMLSEC_METHODOLOGY_REF_ASSUMPTIONS; + } else if (tgc instanceof SysmlsecMethodologyReferenceToRequirement) { + return SYSMLSEC_METHODOLOGY_REF_REQUIREMENT; + } else if (tgc instanceof SysmlsecMethodologyReferenceToAnalysis) { + return SYSMLSEC_METHODOLOGY_REF_ANALYSIS; + } else if (tgc instanceof SysmlsecMethodologyReferenceToDesign) { + return SYSMLSEC_METHODOLOGY_REF_DESIGN; + } else if (tgc instanceof SysmlsecMethodologyReferenceToProperties) { + return SYSMLSEC_METHODOLOGY_REF_PROPERTIES; + } else if (tgc instanceof SysmlsecMethodologyReferenceToPrototype) { + return SYSMLSEC_METHODOLOGY_REF_PROTOTYPE; + } else if (tgc instanceof SysmlsecMethodologyDiagramName) { + return SYSMLSEC_METHODOLOGY_DIAGRAM_NAME; + } else if (tgc instanceof SysmlsecMethodologyConnector) { + return SYSMLSEC_METHODOLOGY_CONNECTOR; + // AVATAR MAD } else if (tgc instanceof AvatarMADAssumption) { @@ -1809,6 +1862,11 @@ public class TGComponentManager { // AVATAR Methodology case AVATARMETHODOLOGY_CONNECTOR: tgc = new AvatarMethodologyConnector(x, y, tdp.getMinX(), tdp.getMaxX(), tdp.getMinY(), tdp.getMaxY(), false, null, tdp, p1, p2, listPoint); + break; + + // SysML-Sec Methodology + case SYSMLSEC_METHODOLOGY_CONNECTOR: + tgc = new SysmlsecMethodologyConnector(x, y, tdp.getMinX(), tdp.getMaxX(), tdp.getMinY(), tdp.getMaxY(), false, null, tdp, p1, p2, listPoint); break; // AVATAR MAD diff --git a/src/ui/sysmlsecmethodology/SysmlsecMethodologyConnectingPoint.java b/src/ui/sysmlsecmethodology/SysmlsecMethodologyConnectingPoint.java new file mode 100755 index 0000000000..8b4ff18390 --- /dev/null +++ b/src/ui/sysmlsecmethodology/SysmlsecMethodologyConnectingPoint.java @@ -0,0 +1,71 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + * + * /** + * Class SysmlsecMethodologyConnectingPoint + * Definition of connecting points on which connectors between elements of sysmlsecmethodo may be connected + * Creation: 26/01/2016 + * @version 1.0 26/01/2016 + * @author Ludovic APVRILLE + * @see + */ + +package ui.sysmlsecmethodology; + +//import java.awt.*; + +import ui.*; + +public class SysmlsecMethodologyConnectingPoint extends TGConnectingPointWidthHeight { + + public SysmlsecMethodologyConnectingPoint(CDElement _container, int _x, int _y, boolean _in, boolean _out, double _w, double _h, int _orientation) { + super(_container, _x, _y, _in, _out, _w, _h); + orientation = _orientation; + } + + public boolean isCompatibleWith(int type) { + + if (type == TGComponentManager.SYSMLSEC_METHODOLOGY_CONNECTOR) { + return true; + } + + + return false; + } + + +} diff --git a/src/ui/sysmlsecmethodology/SysmlsecMethodologyConnector.java b/src/ui/sysmlsecmethodology/SysmlsecMethodologyConnector.java new file mode 100755 index 0000000000..dc95b9e027 --- /dev/null +++ b/src/ui/sysmlsecmethodology/SysmlsecMethodologyConnector.java @@ -0,0 +1,88 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + * + * /** + * Class SysmlsecMethodologyConnector + * Connector to be used in Sysmlsec methodology. Connects two diagram references + * Creation: 26/01/2016 + * @version 1.0 26/01/2016 + * @author Ludovic APVRILLE + * @see + */ + +package ui.sysmlsecmethodology; + +import java.awt.*; +//import java.awt.geom.*; +import java.util.*; + +import myutil.*; + +import ui.*; + +public class SysmlsecMethodologyConnector extends TGConnectorWithCommentConnectionPoints { + int w, h; + + public SysmlsecMethodologyConnector(int _x, int _y, int _minX, int _minY, int _maxX, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp, TGConnectingPoint _p1, TGConnectingPoint _p2, Vector _listPoint) { + super(_x, _y, _minX, _minY, _maxX, _maxY, _pos, _father, _tdp, _p1, _p2, _listPoint); + value = "<<deriveReqt>>"; + + myImageIcon = IconManager.imgic1008; + + removable = false; + } + + + protected void drawLastSegment(Graphics g, int x1, int y1, int x2, int y2){ + + //g.drawLine(x1, y1, x2, y2); + GraphicLib.arrowWithLine(g, 1, 1, 0, x1, y1, x2, y2, false); + + } + + public TGComponent extraIsOnOnlyMe(int x1, int y1) { + if (GraphicLib.isInRectangle(x1, y1, (p1.getX() + p2.getX() - w) / 2, (p1.getY() + p2.getY())/2 - h, w, h)) { + return this; + } + return null; + } + + public int getType() { + return TGComponentManager.SYSMLSEC_METHODOLOGY_CONNECTOR; + } + +} diff --git a/src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramName.java b/src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramName.java new file mode 100755 index 0000000000..8b043e9be6 --- /dev/null +++ b/src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramName.java @@ -0,0 +1,316 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + + ludovic.apvrille AT enst.fr + + This software is a computer program whose purpose is to allow the + edition of TURTLE analysis, design and deployment diagrams, to + allow the generation of RT-LOTOS or Java code from this diagram, + and at last to allow the analysis of formal validation traces + obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + from INRIA Rhone-Alpes. + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited + liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + /** + * Class SysmlsecMethodologyDiagramName + * Internal component that shows the diagram name and validation/simu + * references + * Creation: 26/01/2016 + * @version 1.0 26/01/2016 + * @author Ludovic APVRILLE + * @see + */ + +package ui.sysmlsecmethodology; + +import java.awt.*; +//import java.awt.geom.*; +import javax.swing.*; + +import ui.*; +import myutil.*; + +public class SysmlsecMethodologyDiagramName extends TGCScalableWithoutInternalComponent implements SwallowedTGComponent { + //protected boolean emptyText; + + public final static int X_MARGIN = 5; + public final static int Y_MARGIN = 3; + + + protected final static int SIM_ANIM = 0; + protected final static int UPP = 1; + protected final static int PROVERIF = 2; + protected final static int INVARIANTS = 3; + protected final static int PROTO = 4; + + + protected final String[] SHORT_ACTION_NAMES = { + "simu", "upp", "proverif", "inv", + "code-gen"}; + + protected final String[] LONG_ACTION_NAMES = { + /*0*/ "Simulation and animate the model", + "Verify safety propeties on the model with UPPAAL", + "Verify security properties on the model with ProVerif", + "Verify mutual exclusions on the model with invariants", + "Generate executable code", + }; + + protected int[] validations; + protected int[] valMinX; + protected int[] valMaxX; + + protected int indexOnMe; // -1 -> on main element. -2: on not precise element; Other: on a validations item. + + private int myWidth, myHeight, widthAppli; + + + public SysmlsecMethodologyDiagramName(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp) { + super(_x, _y, _minX, _maxX, _minY, _maxY, _pos, _father, _tdp); + + nbConnectingPoint = 0; + minWidth = 10; + nbInternalTGComponent = 0; + + moveable = true; + editable = true; + removable = false; + + name = "value "; + + + + initScaling(10, 10); + + + myImageIcon = IconManager.imgic302; + } + + public void internalDrawing(Graphics g) { + boolean onMe = false; + + if (tdp.componentPointed() == this) { + onMe = true; + } + + if ((y+Y_MARGIN) > (getFather().getY()+getFather().getHeight())) { + return; + } + + //TraceManager.addDev("Internal drawing ..."); + int currentMaxX; + String val = value; + int w = g.getFontMetrics().stringWidth(value); + int wf = getFather().getWidth(); + int w1; + int saveCurrentMaxX; + boolean oneWritten; + + if (wf < w+(2*X_MARGIN)) { + val = "."; + } + + int curWidth = myWidth; + + + + Font f = g.getFont(); + + if (onMe && indexOnMe == -1) { + g.setFont(f.deriveFont(Font.BOLD)); + } + widthAppli = g.getFontMetrics().stringWidth(val); + curWidth = Math.max(widthAppli, curWidth); + g.drawString(val, x, y); + g.setFont(f); + + if (validations == null) { + if (getFather() instanceof SysmlsecMethodologyDiagramReference) { + ((SysmlsecMethodologyDiagramReference)(getFather())).makeValidationInfos(this); + } + } + + if ((validations != null) && (valMinX == null)) { + valMinX = new int[validations.length]; + valMaxX = new int[validations.length]; + } + + /*if (validations == null) { + TraceManager.addDev("null validation"); + } else { + TraceManager.addDev("Validation size=" + validations.length); + }*/ + + currentMaxX = wf + x - 2*(X_MARGIN); + saveCurrentMaxX = currentMaxX; + + if (wf < w+(2*X_MARGIN)) { + makeScale(g, w+(2*X_MARGIN)); + return; + } + + //TraceManager.addDev("Tracing validation Validation size=" + validations.length); + oneWritten = false; + + + g.setFont(f.deriveFont(Font.ITALIC)); + if ((validations != null) & (validations.length >0)) { + for(int i=validations.length-1; i>=0; i--) { + //TraceManager.addDev("Validations[" + i + "] = " + validations[i]); + + w1 = g.getFontMetrics().stringWidth(SHORT_ACTION_NAMES[validations[i]]); + + + if ((onMe && indexOnMe == i)) { + g.setFont(f.deriveFont(Font.ITALIC)); + } + + if ((currentMaxX - w1) > (x + w)) { + if ((onMe && indexOnMe == i)) { + g.setFont(f.deriveFont(Font.BOLD)); + } + g.drawString(SHORT_ACTION_NAMES[validations[i]], currentMaxX - w1, y); + g.setFont(f.deriveFont(Font.ITALIC)); + valMinX[i] = currentMaxX-w1; + valMaxX[i] = currentMaxX; + oneWritten = true; + currentMaxX = currentMaxX - w1 - 5; + } else { + break; + } + + } + } + + + + g.setFont(f); + + if (oneWritten) { + makeScale(g, saveCurrentMaxX - x); + } else { + makeScale(g, w); + } + + //TraceManager.addDev("current width=" + curWidth); + if (onMe) + + g.drawRect(x-2, y-12, curWidth+5, 15); + + return; + + + } + + private void makeScale(Graphics g, int _size) { + if (!tdp.isScaled()) { + myWidth = _size; + myHeight = g.getFontMetrics().getHeight(); + } + } + + + public TGComponent isOnMe(int _x, int _y) { + int oldIndex = indexOnMe; + if (GraphicLib.isInRectangle(_x, _y, x, y - height, Math.max(myWidth, minWidth), myHeight)) { + indexOnMe = -2; + + if (_x <= (x+widthAppli)) { + indexOnMe = -1; + tdp.getMGUI().setStatusBarText("Open the " + value + " model"); + } + if ((validations != null) && (validations.length > 0)) { + for(int i=0; i<validations.length; i++) { + if ((_x >= valMinX[i]) && (_x <= valMaxX[i])) { + indexOnMe = i; + tdp.getMGUI().setStatusBarText(LONG_ACTION_NAMES[validations[i]]); + //TraceManager.addDev("Index on " + indexOnMe); + break; + } + } + } + + if (oldIndex != indexOnMe) { + tdp.repaint(); + } + + + return this; + } + return null; + } + + public boolean editOndoubleClick(JFrame frame) { + + if (indexOnMe == -1) { + // Opening the diagram + if (!tdp.getMGUI().selectMainTab(value)) { + TraceManager.addDev("Diagram removed?"); + return false; + } + + } + + + if (indexOnMe > -1) { + SysmlsecMethodologyDiagramReference ref = ((SysmlsecMethodologyDiagramReference)(getFather())); + ref.makeCall(value, indexOnMe); + } + + + return true; + } + + + public int getType() { + return TGComponentManager.SYSMLSEC_METHODOLOGY_DIAGRAM_NAME; + } + + public int getDefaultConnector() { + return TGComponentManager.SYSMLSEC_METHODOLOGY_CONNECTOR; + } + + public void setValidationsNumber(int size) { + validations = new int[size]; + } + + public void setValidationsInfo(int _index, int _val) { + validations[_index] = _val; + } + + public void rescale(double scaleFactor){ + + if ((valMinX != null) && (valMinX.length > 0)) { + for(int i=0; i<valMinX.length; i++) { + valMinX[i] = (int)(valMinX[i] / oldScaleFactor * scaleFactor); + valMaxX[i] = (int)(valMaxX[i] / oldScaleFactor * scaleFactor); + } + } + + super.rescale(scaleFactor); + } +} diff --git a/src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramPanel.java b/src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramPanel.java new file mode 100755 index 0000000000..3cc2af5af8 --- /dev/null +++ b/src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramPanel.java @@ -0,0 +1,134 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + * + * /** + * Class SysmlsecMethodologyDiagramPanel + * Panel for displaying the sysmlsec methodology + * Creation: 26/01/2016 + * @version 1.0 26/01/2016 + * @author Ludovic APVRILLE + * @see + */ + +package ui.sysmlsecmethodology; + +import org.w3c.dom.*; + +//import java.awt.*; +import java.util.*; + +import ui.*; +import myutil.*; + + +public class SysmlsecMethodologyDiagramPanel extends TDiagramPanel implements TDPWithAttributes { + //public Vector validated, ignored; + + public SysmlsecMethodologyDiagramPanel(MainGUI mgui, TToolBar _ttb) { + super(mgui, _ttb); + TraceManager.addDev("Sysmlsec metho diagram created"); + /*TDiagramMouseManager tdmm = new TDiagramMouseManager(this); + addMouseListener(tdmm); + addMouseMotionListener(tdmm);*/ + } + + public boolean actionOnDoubleClick(TGComponent tgc) { + return true; + } + + public boolean actionOnAdd(TGComponent tgc) { + /*if (tgc instanceof TCDTClass) { + TCDTClass tgcc = (TCDTClass)(tgc); + mgui.addTClass(tgcc.getClassName()); + return true; + }*/ + return false; + } + + public boolean actionOnRemove(TGComponent tgc) { + /*if (tgc instanceof TCDTClass) { + TCDTClass tgcc = (TCDTClass)(tgc); + mgui.removeTClass(tgcc.getClassName()); + resetAllInstancesOf(tgcc); + return true; + }*/ + return false; + } + + public boolean actionOnValueChanged(TGComponent tgc) { + /*if (tgc instanceof TCDTClass) { + return actionOnDoubleClick(tgc); + }*/ + return false; + } + + public String getXMLHead() { + return "<SysmlsecMethodologyDiagramPanel name=\"" + name + "\"" + sizeParam() + zoomParam() + " >"; + } + + public String getXMLTail() { + return "</SysmlsecMethodologyDiagramPanel>"; + } + + public String getXMLSelectedHead() { + return "<SysmlsecMethodologyDiagramPanelCopy name=\"" + name + "\" xSel=\"" + xSel + "\" ySel=\"" + ySel + "\" widthSel=\"" + widthSel + "\" heightSel=\"" + heightSel + "\" >"; + } + + public String getXMLSelectedTail() { + return "</SysmlsecMethodologyDiagramPanelCopy>"; + } + + public String getXMLCloneHead() { + return "<SysmlsecMethodologyDiagramPanelCopy name=\"" + name + "\" xSel=\"" + 0 + "\" ySel=\"" + 0 + "\" widthSel=\"" + 0 + "\" heightSel=\"" + 0 + "\" >"; + } + + public String getXMLCloneTail() { + return "</SysmlsecMethodologyDiagramPanelCopy>"; + } + + + public void makePostLoadingProcessing() throws MalformedModelingException { + + } + + public void enhance() { + autoAdjust(); + } + + public void loadExtraParameters(Element elt) { + } +} diff --git a/src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramReference.java b/src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramReference.java new file mode 100755 index 0000000000..54fcaef33a --- /dev/null +++ b/src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramReference.java @@ -0,0 +1,554 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + + ludovic.apvrille AT enst.fr + + This software is a computer program whose purpose is to allow the + edition of TURTLE analysis, design and deployment diagrams, to + allow the generation of RT-LOTOS or Java code from this diagram, + and at last to allow the analysis of formal validation traces + obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + from INRIA Rhone-Alpes. + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited + liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + /** + * Class SysmlsecMethodologyDiagramReference + * Diagram reference requirement: Used to reference diagrams from the + * Sysmlsec methodology + * Creation: 26/01/2016 + * @version 1.0 26/01/2016 + * @author Ludovic APVRILLE + * @see + */ + +package ui.sysmlsecmethodology; + + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; +import java.util.*; + +import org.w3c.dom.*; + +import myutil.*; +import ui.*; +import ui.window.*; + +public abstract class SysmlsecMethodologyDiagramReference extends TGCScalableWithInternalComponent implements SwallowTGComponent { + public String oldValue; + protected int textX = 5; + protected int textY = 22; + protected int lineHeight = 30; + protected double dlineHeight = 0.0; + //protected int reqType = 0; + // 0: normal, 1: formal, 2: security + //protected int startFontSize = 10; + protected Graphics graphics; + protected int iconSize = 30; + + protected Font myFont, myFontB; + protected int maxFontSize = 30; + protected int minFontSize = 4; + protected int currentFontSize = -1; + protected boolean displayText = true; + + protected int typeOfReference; + + protected final static String[] TYPE_STR = {"Assumptions", "Requirements", "Analysis", "Design", "Properties", "Prototyping"}; + protected final static int NB_TYPE = 6; + + protected final static int ASSUMPTIONS = 0; + protected final static int REQUIREMENT = 1; + protected final static int ANALYSIS = 2; + protected final static int DESIGN = 3; + protected final static int PROPERTY = 4; + protected final static int PROTOTYPING = 5; + + protected JMenuItem diagramReference; + + + + // Icon + //private int iconSize = 18; + //private boolean iconIsDrawn = false; + + public SysmlsecMethodologyDiagramReference(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp) { + super(_x, _y, _minX, _maxX, _minY, _maxY, _pos, _father, _tdp); + + initScaling(200, 120); + oldScaleFactor = tdp.getZoom(); + dlineHeight = lineHeight * oldScaleFactor; + lineHeight = (int)dlineHeight; + dlineHeight = dlineHeight - lineHeight; + + minWidth = 10; + minHeight = lineHeight; + + addTGConnectingPointsCommentTop(); + + nbInternalTGComponent = 0; + //tgcomponent = new TGComponent[nbInternalTGComponent]; + + int h = 1; + //TAttributeRequirement tgc0; + //tgc0 = new TAttributeRequirement(x, y+height+h, 0, 0, height + h, height+h, true, this, _tdp); + //tgcomponent[0] = tgc0; + + moveable = true; + editable = true; + removable = false; + userResizable = true; + multieditable = true; + + + + oldValue = value; + + myImageIcon = IconManager.imgic5006; + + + actionOnAdd(); + } + + + public void internalDrawing(Graphics g) { + Font f = g.getFont(); + Font fold = f; + int w, c; + int size; + + value = TYPE_STR[typeOfReference]; + + if (!tdp.isScaled()) { + graphics = g; + } + + if (((rescaled) && (!tdp.isScaled())) || myFont == null) { + currentFontSize = tdp.getFontSize(); + //System.out.println("Rescaled, font size = " + currentFontSize + " height=" + height); + myFont = f.deriveFont((float)currentFontSize); + myFontB = myFont.deriveFont(Font.BOLD); + + if (rescaled) { + rescaled = false; + } + } + + if(currentFontSize <minFontSize) { + displayText = false; + } else { + displayText = true; + } + + int h = g.getFontMetrics().getHeight(); + + g.setColor(ColorManager.AVATAR_REQUIREMENT_TOP); + g.fillRect(x, y, width, height); + ColorManager.setColor(g, getState(), 0); + g.drawRect(x, y, width, height); + + //g.drawLine(x, y+lineHeight, x+width, y+lineHeight); + //g.setColor(ColorManager.AVATAR_REQUIREMENT_TOP); + //g.fillRect(x+1, y+1, width-1, lineHeight-1); + //g.setColor(ColorManager.AVATAR_REQUIREMENT_TOP); + //g.fillRect(x+1, y+1+lineHeight, width-1, height-1-lineHeight); + ColorManager.setColor(g, getState(), 0); + if ((lineHeight > 23) && (width > 23)){ + g.drawImage(IconManager.img5100, x + width - iconSize + 1, y + 3, Color.yellow, null); + } + + if (displayText) { + size = currentFontSize - 2; + g.setFont(myFontB); + + drawLimitedString(g, value, x, y + size + 3, width, 1); + g.setFont(f); + } + + /*if (displayText) { + size = currentFontSize - 2; + g.setFont(myFont.deriveFont((float)(myFont.getSize() - 2))); + + drawLimitedString(g, REQ_TYPE_STR[reqType], x, y + size, width, 1); + + size += currentFontSize; + g.setFont(myFontB); + w = g.getFontMetrics().stringWidth(value); + drawLimitedString(g, value, x, y + size, width, 1); + + } + + if (verified) { + if (satisfied) { + Color tmp = g.getColor(); + GraphicLib.setMediumStroke(g); + g.setColor(Color.green); + g.drawLine(x+width-2, y-6+lineHeight, x+width-6, y-2+lineHeight); + g.drawLine(x+width-6, y-3+lineHeight, x+width-8, y-6+lineHeight); + g.setColor(tmp); + GraphicLib.setNormalStroke(g); + } else { + //g.drawString("acc", x + width - 10, y+height-10); + Color tmp = g.getColor(); + GraphicLib.setMediumStroke(g); + g.setColor(Color.red); + g.drawLine(x+width-2, y-2+lineHeight, x+width-8, y-8+lineHeight); + g.drawLine(x+width-8, y-2+lineHeight, x+width-2, y-8+lineHeight); + g.setColor(tmp); + GraphicLib.setNormalStroke(g); + } + } + + g.setFont(myFont); + String texti = "Text"; + String s ; + int i; + size = lineHeight + currentFontSize; + + //ID + if (size < (height - 2)) { + drawLimitedString(g, "ID=" + id, x + textX, y + size, width, 0); + } + size += currentFontSize; + + //text + for(i=0; i<texts.length; i++) { + if (size < (height - 2)) { + s = texts[i]; + if (i == 0) { + s = texti + "=\"" + s; + } + if (i == (texts.length - 1)) { + s = s + "\""; + } + drawLimitedString(g, s, x + textX, y + size, width, 0); + } + size += currentFontSize; + + } + // Type and risk + if (size < (height - 2)) { + drawLimitedString(g, "Kind=\"" + kind + "\"", x + textX, y + size, width, 0); + size += currentFontSize; + if (size < (height - 2)) { + drawLimitedString(g, "Risk=\"" + criticality + "\"", x + textX, y + size, width, 0); + size += currentFontSize; + if (size < (height - 2)) { + + drawLimitedString(g, "Reference elements=\"" + referenceElements + "\"", x + textX, y + size, width, 0); + + size += currentFontSize; + if (size < (height - 2)) { + + if (reqType == SECURITY_REQ) { + drawLimitedString(g, "Targeted attacks=\"" + attackTreeNode + "\"", x + textX, y + size, width, 0); + } + + if (reqType == SAFETY_REQ) { + drawLimitedString(g, "Violated action=\"" + violatedAction + "\"", x + textX, y + size, width, 0); + } + } + } + } + } + + + g.setFont(f);*/ + } + + public boolean editOndoubleClick(JFrame frame, int _x, int _y) { + addDiagramReference(frame); + return true; + // On the name ? + /*oldValue = value; + + if ((displayText) && (_y <= (y + lineHeight))) { + String text = getName() + ": "; + if (hasFather()) { + text = getTopLevelName() + " / " + text; + } + String s = (String)JOptionPane.showInputDialog(frame, text, + "setting value", JOptionPane.PLAIN_MESSAGE, IconManager.imgic101, + null, + getValue()); + + if ((s != null) && (s.length() > 0) && (!s.equals(oldValue))) { + //boolean b; + if (!TAttribute.isAValidId(s, false, false)) { + JOptionPane.showMessageDialog(frame, + "Could not change the name of the Requirement: the new name is not a valid name", + "Error", + JOptionPane.INFORMATION_MESSAGE); + return false; + } + + if (!tdp.isRequirementNameUnique(s)) { + JOptionPane.showMessageDialog(frame, + "Could not change the name of the Requirement: the new name is already in use", + "Error", + JOptionPane.INFORMATION_MESSAGE); + return false; + } + + + int size = graphics.getFontMetrics().stringWidth(s) + iconSize + 5; + minDesiredWidth = Math.max(size, minWidth); + if (minDesiredWidth != width) { + newSizeForSon(null); + } + setValue(s); + + if (tdp.actionOnDoubleClick(this)) { + return true; + } else { + JOptionPane.showMessageDialog(frame, + "Could not change the name of the Requirement: this name is already in use", + "Error", + JOptionPane.INFORMATION_MESSAGE); + setValue(oldValue); + } + } + return false; + } + + return editAttributes();*/ + + } + + + public void rescale(double scaleFactor){ + dlineHeight = (lineHeight + dlineHeight) / oldScaleFactor * scaleFactor; + lineHeight = (int)(dlineHeight); + dlineHeight = dlineHeight - lineHeight; + + minHeight = lineHeight; + + super.rescale(scaleFactor); + } + + + public TGComponent isOnOnlyMe(int x1, int y1) { + if (GraphicLib.isInRectangle(x1, y1, x, y, width, height)) { + return this; + } + return null; + } + + + + public void addActionToPopupMenu(JPopupMenu componentMenu, ActionListener menuAL, int x, int y) { + + componentMenu.addSeparator(); + + diagramReference = new JMenuItem("Add diagram reference"); + diagramReference.addActionListener(menuAL); + + componentMenu.add(diagramReference); + } + + public boolean eventOnPopup(ActionEvent e) { + String s = e.getActionCommand(); + + if (e.getSource() == diagramReference) { + addDiagramReference(null); + } + + return true; + } + + public void addDiagramReference(JFrame frame) { + JDialogManageListOfString jdmlos; + Vector<String> ignored; // Must be built from non selected TMLTaskDiagramPanel or TMLCompPanel + Vector<String> selected; // Must be built from refered diagrams that have not been + + ignored = new Vector<String>(); + selected = new Vector<String>(); + + fillIgnoredSelectedFromInternalComponents(ignored, selected); + + jdmlos = new JDialogManageListOfString(frame, ignored, selected, "Selection of diagrams"); + jdmlos.setSize(550, 350); + GraphicLib.centerOnParent(jdmlos); + jdmlos.show(); + + ignored = jdmlos.getIgnored(); + selected = jdmlos.getSelected(); + + + //We reconstruct the list of internal components. + SysmlsecMethodologyDiagramName dn; + nbInternalTGComponent = 0; + tgcomponent = null; + int index = 0; + int tmpx, tmpy; + for(String s: selected) { + tmpy = (int)(y + (40*tdp.getZoom()) + (index * 15 *tdp.getZoom())); + tmpx = (int)(SysmlsecMethodologyDiagramName.X_MARGIN*tdp.getZoom()); + dn = new SysmlsecMethodologyDiagramName(x+tmpx, tmpy, x+tmpx, x+tmpx, tmpy, tmpy, true, this, getTDiagramPanel()); + //makeValidationInfos(dn); + dn.setValue(s); + addInternalComponent(dn, index); + index ++; + } + + + // We must first remove from internalComponents the one that are now ignored + /*AvatarMethodologyDiagramName dn; + TGComponent t; + int i; + for(String s: ignored) { + t = null; + for(i=0; i<nbInternalTGComponent; i++) { + dn = (AvatarMethodologyDiagramName)tgcomponent[i]; + if (dn.getValue().compareTo(s) == 0) { + t = dn; + break; + } + } + if (t != null) { + removeInternalComponent(t); + } + } + + + // We then add the ones that are newly selected + int index; + index = 0; + int tmpx, tmpy; + for(String s: selected) { + if (!hasAvatarMethodologyDiagramName(s)) { + tmpy = (int)(y + (40*tdp.getZoom()) + (index * 15 *tdp.getZoom())); + tmpx = (int)(AvatarMethodologyDiagramName.X_MARGIN*tdp.getZoom()); + dn = new AvatarMethodologyDiagramName(x+tmpx, tmpy, x+tmpx, x+tmpx, tmpy, tmpy, true, this, getTDiagramPanel()); + //makeValidationInfos(dn); + dn.setValue(s); + addInternalComponent(dn, index); + + } + index ++; + }*/ + } + + public abstract void makeValidationInfos(SysmlsecMethodologyDiagramName dn); + + public boolean hasSysmlsecMethodologyDiagramName(String s) { + for(int i=0; i<nbInternalTGComponent; i++) { + if (tgcomponent[i].getValue().compareTo(s) == 0) { + return true; + } + } + return false; + } + + + public void fillIgnoredSelectedFromInternalComponents(Vector<String> ignored, Vector<String>selected) { + // Get from mgui the list of all diagrams with type depends from the subclass + // If diagrams have the same name -> we do not see the difference + + TURTLEPanel tp; + Vector tabs = getTDiagramPanel().getMGUI().getTabs(); + for(Object o: tabs) { + tp = (TURTLEPanel)o; + if (isAValidPanelType(tp)) { + ignored.add(getTDiagramPanel().getMGUI().getTitleAt(tp)); + } + } + + Vector<String> newSelected = new Vector<String>(); + TGComponent tgc; + //Consider internal components (text) to figure out the ones that are selected + for(int i=0; i<nbInternalTGComponent; i++) { + tgc = tgcomponent[i]; + if (tgc instanceof SysmlsecMethodologyDiagramName) { + newSelected.add(tgc.getValue()); + } + } + + // Remove from selected the one that do not exist anymore + Vector<String> toBeRemoved = new Vector<String>(); + boolean found; + for(String s: newSelected) { + found = false; + for(String ss: ignored) { + if (ss.compareTo(s) == 0) { + toBeRemoved.add(ss); + found = true; + } + } + if (found) { + selected.add(s); + } + } + + for(String s: toBeRemoved) { + ignored.remove(s); + } + + } + + public abstract boolean isAValidPanelType(TURTLEPanel panel); + + public boolean acceptSwallowedTGComponent(TGComponent tgc) { + if (tgc instanceof SysmlsecMethodologyDiagramName) { + return true; + } + return false; + } + + public boolean addSwallowedTGComponent(TGComponent tgc, int x, int y) { + tgc.setFather(this); + addInternalComponent(tgc, 0); + //tgc.setDrawingZone(true); + return true; + } + + public void removeSwallowedTGComponent(TGComponent tgc) { + removeInternalComponent(tgc); + } + + public abstract boolean makeCall(String diagramName, int index); + + protected boolean openDiagram(String tabName) { + if (!tdp.getMGUI().selectMainTab(tabName)) { + TraceManager.addDev("Diagram removed?"); + return false; + } + return true; + } + + protected void giveInformation(String info) { + tdp.getMGUI().setStatusBarText(info); + } + + + + /*public String getDiagramReferences() { + return referenceElements; + }*/ + +} diff --git a/src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramToolbar.java b/src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramToolbar.java new file mode 100755 index 0000000000..0485b44b0b --- /dev/null +++ b/src/ui/sysmlsecmethodology/SysmlsecMethodologyDiagramToolbar.java @@ -0,0 +1,104 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + + ludovic.apvrille AT enst.fr + + This software is a computer program whose purpose is to allow the + edition of TURTLE analysis, design and deployment diagrams, to + allow the generation of RT-LOTOS or Java code from this diagram, + and at last to allow the analysis of formal validation traces + obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + from INRIA Rhone-Alpes. + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited + liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + /** + * Class SysmlsecMethodologyDiagramToolbar + * Implements the toolbar to be used in conjunction with the SysML-Sec Methodology + * Creation: 26/01/2016 + * @version 1.0 26/01/2016 + * @author Ludovic APVRILLE + * @see + */ + +package ui.sysmlsecmethodology; + +import javax.swing.*; +//import java.awt.*; +//import java.awt.event.*; + +import ui.*; + +public class SysmlsecMethodologyDiagramToolbar extends TToolBar { + + public SysmlsecMethodologyDiagramToolbar(MainGUI _mgui) { + super(_mgui); + + } + + protected void setActive(boolean b) { + mgui.actions[TGUIAction.ACT_ZOOM_MORE].setEnabled(b); + mgui.actions[TGUIAction.ACT_ZOOM_LESS].setEnabled(b); + + mgui.actions[TGUIAction.ACT_SHOW_ZOOM].setEnabled(b); + mgui.updateZoomInfo(); + + //mgui.actions[TGUIAction.ARD_EDIT].setEnabled(b); + mgui.actions[TGUIAction.UML_NOTE].setEnabled(b); + mgui.actions[TGUIAction.CONNECTOR_COMMENT].setEnabled(b); + /*mgui.actions[TGUIAction.ARD_REQUIREMENT].setEnabled(b); + mgui.actions[TGUIAction.ARD_PROPERTY].setEnabled(b); + mgui.actions[TGUIAction.ARD_VERIFY_CONNECTOR].setEnabled(b); + mgui.actions[TGUIAction.ARD_DERIVE_CONNECTOR].setEnabled(b); + mgui.actions[TGUIAction.ARD_REFINE_CONNECTOR].setEnabled(b); + mgui.actions[TGUIAction.ARD_COPY_CONNECTOR].setEnabled(b); + mgui.actions[TGUIAction.ARD_COMPOSITION_CONNECTOR].setEnabled(b); + + mgui.actions[TGUIAction.ACT_TOGGLE_ATTR].setEnabled(b); + + mgui.actions[TGUIAction.ACT_ENHANCE].setEnabled(b);*/ + + } + + protected void setButtons() { + JButton button; + + /*button = this.add(mgui.actions[TGUIAction.ARD_EDIT]); + button.addMouseListener(mgui.mouseHandler); + + this.addSeparator();*/ + + button = this.add(mgui.actions[TGUIAction.UML_NOTE]); + button.addMouseListener(mgui.mouseHandler); + + button = this.add(mgui.actions[TGUIAction.CONNECTOR_COMMENT]); + button.addMouseListener(mgui.mouseHandler); + + this.addSeparator(); + + } + +} // Class diff --git a/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToAnalysis.java b/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToAnalysis.java new file mode 100755 index 0000000000..b9478b4fef --- /dev/null +++ b/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToAnalysis.java @@ -0,0 +1,103 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + + ludovic.apvrille AT enst.fr + + This software is a computer program whose purpose is to allow the + edition of TURTLE analysis, design and deployment diagrams, to + allow the generation of RT-LOTOS or Java code from this diagram, + and at last to allow the analysis of formal validation traces + obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + from INRIA Rhone-Alpes. + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited + liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + /** + * Class SysmlsecMethodologyReferenceToAnalysis + * Diagram reference analysis: Used to reference diagrams from the + * Sysmlsec methodology + * Creation: 29/01/2016 + * @version 1.0 29/01/2016 + * @author Ludovic APVRILLE + * @see + */ + +package ui.sysmlsecmethodology; + + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; + +import org.w3c.dom.*; + +import myutil.*; +import ui.*; +import ui.window.*; + +public class SysmlsecMethodologyReferenceToAnalysis extends SysmlsecMethodologyDiagramReference { + + + public SysmlsecMethodologyReferenceToAnalysis(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp) { + super(_x, _y, _minX, _maxX, _minY, _maxY, _pos, _father, _tdp); + + initScaling(200, 70); + + nbConnectingPoint = 2; + connectingPoint = new TGConnectingPoint[nbConnectingPoint]; + connectingPoint[0] = new SysmlsecMethodologyConnectingPoint(this, 0, 0, false, true, 0.0, 0.5, TGConnectingPoint.WEST); + connectingPoint[1] = new SysmlsecMethodologyConnectingPoint(this, 0, 0, false, true, 0.3, 1.0, TGConnectingPoint.WEST); + + typeOfReference = ANALYSIS; + + addTGConnectingPointsCommentTop(); + + } + + public int getType() { + return TGComponentManager.SYSMLSEC_METHODOLOGY_REF_ANALYSIS; + } + + public boolean isAValidPanelType(TURTLEPanel panel) { + if (panel instanceof AvatarAnalysisPanel) { + return true; + } + if (panel instanceof AttackTreePanel) { + return true; + } + + return false; + } + + public void makeValidationInfos(SysmlsecMethodologyDiagramName dn) { + dn.setValidationsNumber(0); + } + + public boolean makeCall(String diagramName, int index) { + return true; + } + +} diff --git a/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToAssumptions.java b/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToAssumptions.java new file mode 100755 index 0000000000..70f1053cf5 --- /dev/null +++ b/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToAssumptions.java @@ -0,0 +1,99 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + + ludovic.apvrille AT enst.fr + + This software is a computer program whose purpose is to allow the + edition of TURTLE analysis, design and deployment diagrams, to + allow the generation of RT-LOTOS or Java code from this diagram, + and at last to allow the analysis of formal validation traces + obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + from INRIA Rhone-Alpes. + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited + liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + /** + * Class SysmlsecMethodologyReferenceToAssumptions + * Diagram reference assumptions: Used to reference diagrams from the + * Sysmlsec methodology + * Creation: 26/01/2016 + * @version 1.0 26/01/2016 + * @author Ludovic APVRILLE + * @see + */ + +package ui.sysmlsecmethodology; + + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; + +import org.w3c.dom.*; + +import myutil.*; +import ui.*; +import ui.window.*; + +public class SysmlsecMethodologyReferenceToAssumptions extends SysmlsecMethodologyDiagramReference { + + + public SysmlsecMethodologyReferenceToAssumptions(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp) { + super(_x, _y, _minX, _maxX, _minY, _maxY, _pos, _father, _tdp); + + initScaling(200, 70); + + nbConnectingPoint = 1; + connectingPoint = new TGConnectingPoint[nbConnectingPoint]; + connectingPoint[0] = new SysmlsecMethodologyConnectingPoint(this, 0, 0, false, true, 0.30, 1.0, TGConnectingPoint.WEST); + + typeOfReference = ASSUMPTIONS; + + addTGConnectingPointsCommentTop(); + + } + + public int getType() { + return TGComponentManager.SYSMLSEC_METHODOLOGY_REF_ASSUMPTIONS; + } + + public boolean isAValidPanelType(TURTLEPanel panel) { + if (panel instanceof AvatarMADsPanel) { + return true; + } + + return false; + } + + public void makeValidationInfos(SysmlsecMethodologyDiagramName dn) { + dn.setValidationsNumber(0); + } + + public boolean makeCall(String diagramName, int index) { + return true; + } + +} diff --git a/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToDesign.java b/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToDesign.java new file mode 100755 index 0000000000..dbaffca31e --- /dev/null +++ b/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToDesign.java @@ -0,0 +1,147 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + + ludovic.apvrille AT enst.fr + + This software is a computer program whose purpose is to allow the + edition of TURTLE analysis, design and deployment diagrams, to + allow the generation of RT-LOTOS or Java code from this diagram, + and at last to allow the analysis of formal validation traces + obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + from INRIA Rhone-Alpes. + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited + liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + /** + * Class SysmlsecMethodologyReferenceToDesign + * Diagram reference to the main sysmlsecdesign: Used to reference diagrams from the + * Sysmlsec methodology + * Creation: 26/01/2016 + * @version 1.0 26/01/2016 + * @author Ludovic APVRILLE + * @see + */ + +package ui.sysmlsecmethodology; + + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; + +import org.w3c.dom.*; + +import myutil.*; +import ui.*; +import ui.window.*; + +public class SysmlsecMethodologyReferenceToDesign extends SysmlsecMethodologyDiagramReference { + + + public SysmlsecMethodologyReferenceToDesign(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp) { + super(_x, _y, _minX, _maxX, _minY, _maxY, _pos, _father, _tdp); + + initScaling(300, 70); + + nbConnectingPoint = 2; + connectingPoint = new TGConnectingPoint[nbConnectingPoint]; + connectingPoint[0] = new SysmlsecMethodologyConnectingPoint(this, 0, 0, false, true, 0.0, 0.5, TGConnectingPoint.WEST); + connectingPoint[1] = new SysmlsecMethodologyConnectingPoint(this, 0, 0, false, true, 0.20, 1.0, TGConnectingPoint.WEST); + + typeOfReference = DESIGN; + + addTGConnectingPointsCommentTop(); + + } + + public int getType() { + return TGComponentManager.SYSMLSEC_METHODOLOGY_REF_DESIGN; + } + + public boolean isAValidPanelType(TURTLEPanel panel) { + if (panel instanceof AvatarDesignPanel) { + return true; + } + + return false; + } + + public void makeValidationInfos(SysmlsecMethodologyDiagramName dn) { + dn.setValidationsNumber(4); + dn.setValidationsInfo(0, SysmlsecMethodologyDiagramName.SIM_ANIM); + dn.setValidationsInfo(1, SysmlsecMethodologyDiagramName.UPP); + dn.setValidationsInfo(2, SysmlsecMethodologyDiagramName.PROVERIF); + dn.setValidationsInfo(3, SysmlsecMethodologyDiagramName.INVARIANTS); + } + + public boolean makeCall(String diagramName, int index) { + String tmp; + + switch(index) { + case 0: + if (!openDiagram(diagramName)) { + return false; + } + if (tdp.getMGUI().checkModelingSyntax(diagramName, true)) { + tdp.getMGUI().avatarSimulation(); + return true; + } + return false; + case 1: + if (!openDiagram(diagramName)) { + return false; + } + if (tdp.getMGUI().checkModelingSyntax(diagramName, true)) { + tdp.getMGUI().avatarUPPAALVerification(); + return true; + } + return false; + case 2: + if (!openDiagram(diagramName)) { + return false; + } + if (tdp.getMGUI().checkModelingSyntax(diagramName, true)) { + tdp.getMGUI().avatarProVerifVerification(); + return true; + } + return false; + case 3: + if (!openDiagram(diagramName)) { + return false; + } + if (tdp.getMGUI().checkModelingSyntax(diagramName, true)) { + tdp.getMGUI().avatarStaticAnalysis(); + return true; + } + return false; + + default: + return false; + } + + } + +} diff --git a/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToProperties.java b/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToProperties.java new file mode 100755 index 0000000000..8290743331 --- /dev/null +++ b/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToProperties.java @@ -0,0 +1,99 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + + ludovic.apvrille AT enst.fr + + This software is a computer program whose purpose is to allow the + edition of TURTLE analysis, design and deployment diagrams, to + allow the generation of RT-LOTOS or Java code from this diagram, + and at last to allow the analysis of formal validation traces + obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + from INRIA Rhone-Alpes. + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited + liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + /** + * Class SysmlsecMethodologyReferenceToProperties + * Diagram reference to safety properties: Used to reference diagrams from the + * Sysmlsec methodology + * Creation: 26/01/2016 + * @version 1.0 26/01/2016 + * @author Ludovic APVRILLE + * @see + */ + +package ui.sysmlsecmethodology; + + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; + +import org.w3c.dom.*; + +import myutil.*; +import ui.*; +import ui.window.*; + +public class SysmlsecMethodologyReferenceToProperties extends SysmlsecMethodologyDiagramReference { + + + public SysmlsecMethodologyReferenceToProperties(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp) { + super(_x, _y, _minX, _maxX, _minY, _maxY, _pos, _father, _tdp); + + initScaling(180, 70); + + nbConnectingPoint = 1; + connectingPoint = new TGConnectingPoint[nbConnectingPoint]; + connectingPoint[0] = new SysmlsecMethodologyConnectingPoint(this, 0, 0, false, true, 0.2, 0.0, TGConnectingPoint.WEST); + + typeOfReference = PROPERTY; + + addTGConnectingPointsCommentTop(); + + } + + public int getType() { + return TGComponentManager.SYSMLSEC_METHODOLOGY_REF_PROPERTIES; + } + + public boolean isAValidPanelType(TURTLEPanel panel) { + if (panel instanceof AvatarRequirementPanel) { + return true; + } + + return false; + } + + public void makeValidationInfos(SysmlsecMethodologyDiagramName dn) { + dn.setValidationsNumber(0); + } + + public boolean makeCall(String diagramName, int index) { + return true; + } + +} diff --git a/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToPrototype.java b/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToPrototype.java new file mode 100755 index 0000000000..700fdb3e21 --- /dev/null +++ b/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToPrototype.java @@ -0,0 +1,114 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + + ludovic.apvrille AT enst.fr + + This software is a computer program whose purpose is to allow the + edition of TURTLE analysis, design and deployment diagrams, to + allow the generation of RT-LOTOS or Java code from this diagram, + and at last to allow the analysis of formal validation traces + obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + from INRIA Rhone-Alpes. + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited + liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + /** + * Class SysmlsecMethodologyReferenceToPrototype + * Diagram reference to disgn with prototype information: Used to reference diagrams from the + * Sysmlsec methodology + * Creation: 26/01/2016 + * @version 1.0 26/01/2016 + * @author Ludovic APVRILLE + * @see + */ + +package ui.sysmlsecmethodology; + + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; + +import org.w3c.dom.*; + +import myutil.*; +import ui.*; +import ui.window.*; + +public class SysmlsecMethodologyReferenceToPrototype extends SysmlsecMethodologyDiagramReference { + + + public SysmlsecMethodologyReferenceToPrototype(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp) { + super(_x, _y, _minX, _maxX, _minY, _maxY, _pos, _father, _tdp); + + initScaling(300, 70); + + nbConnectingPoint = 1; + connectingPoint = new TGConnectingPoint[nbConnectingPoint]; + connectingPoint[0] = new SysmlsecMethodologyConnectingPoint(this, 0, 0, false, true, 0.0, 0.5, TGConnectingPoint.WEST); + + typeOfReference = PROTOTYPING; + + addTGConnectingPointsCommentTop(); + + } + + public int getType() { + return TGComponentManager.SYSMLSEC_METHODOLOGY_REF_PROTOTYPE; + } + + public boolean isAValidPanelType(TURTLEPanel panel) { + if (panel instanceof AvatarDesignPanel) { + return true; + } + + return false; + } + + public void makeValidationInfos(SysmlsecMethodologyDiagramName dn) { + dn.setValidationsNumber(1); + + dn.setValidationsInfo(0, SysmlsecMethodologyDiagramName.PROTO); + } + + public boolean makeCall(String diagramName, int index) { + switch(index) { + case 0: + if (!openDiagram(diagramName)) { + return false; + } + if (tdp.getMGUI().checkModelingSyntax(diagramName, true)) { + tdp.getMGUI().avatarExecutableCodeGeneration(); + return true; + } + return false; + default: + return false; + } + + } + +} diff --git a/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToRequirement.java b/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToRequirement.java new file mode 100755 index 0000000000..54ba6ae913 --- /dev/null +++ b/src/ui/sysmlsecmethodology/SysmlsecMethodologyReferenceToRequirement.java @@ -0,0 +1,101 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + +ludovic.apvrille AT enst.fr + +This software is a computer program whose purpose is to allow the +edition of TURTLE analysis, design and deployment diagrams, to +allow the generation of RT-LOTOS or Java code from this diagram, +and at last to allow the analysis of formal validation traces +obtained from external tools, e.g. RTL from LAAS-CNRS and CADP +from INRIA Rhone-Alpes. + +This software is governed by the CeCILL license under French law and +abiding by the rules of distribution of free software. You can use, +modify and/ or redistribute the software under the terms of the CeCILL +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +As a counterpart to the access to the source code and rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors have only limited +liability. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. + +/** +* Class SysmlsecMethodologyReferenceToRequirement +* Diagram reference requirement: Used to reference diagrams from the +* Sysmlsecmethodology +* Creation: 26/01/2016 +* @version 1.0 26/01/2016 +* @author Ludovic APVRILLE +* @see +*/ + +package ui.sysmlsecmethodology; + + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; + +import org.w3c.dom.*; + +import myutil.*; +import ui.*; +import ui.window.*; + +public class SysmlsecMethodologyReferenceToRequirement extends SysmlsecMethodologyDiagramReference { + + + public SysmlsecMethodologyReferenceToRequirement(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp) { + super(_x, _y, _minX, _maxX, _minY, _maxY, _pos, _father, _tdp); + + initScaling(200, 70); + + nbConnectingPoint = 3; + connectingPoint = new TGConnectingPoint[nbConnectingPoint]; + connectingPoint[0] = new SysmlsecMethodologyConnectingPoint(this, 0, 0, false, true, 0.0, 0.5, TGConnectingPoint.WEST); + connectingPoint[1] = new SysmlsecMethodologyConnectingPoint(this, 0, 0, false, true, 0.3, 1.0, TGConnectingPoint.WEST); + connectingPoint[2] = new SysmlsecMethodologyConnectingPoint(this, 0, 0, false, true, 0.1, 1.0, TGConnectingPoint.WEST); + + typeOfReference = REQUIREMENT; + + addTGConnectingPointsCommentTop(); + + } + + public int getType() { + return TGComponentManager.SYSMLSEC_METHODOLOGY_REF_REQUIREMENT; + } + + public boolean isAValidPanelType(TURTLEPanel panel) { + if (panel instanceof AvatarRequirementPanel) { + return true; + } + + return false; + } + + public void makeValidationInfos(SysmlsecMethodologyDiagramName dn) { + dn.setValidationsNumber(0); + } + + public boolean makeCall(String diagramName, int index) { + return true; + } + +} diff --git a/src/ui/tree/DiagramTreeRenderer.java b/src/ui/tree/DiagramTreeRenderer.java index 07ffd438a7..dd0b8defc5 100755 --- a/src/ui/tree/DiagramTreeRenderer.java +++ b/src/ui/tree/DiagramTreeRenderer.java @@ -1,48 +1,48 @@ /**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille -ludovic.apvrille AT enst.fr + ludovic.apvrille AT enst.fr -This software is a computer program whose purpose is to allow the -edition of TURTLE analysis, design and deployment diagrams, to -allow the generation of RT-LOTOS or Java code from this diagram, -and at last to allow the analysis of formal validation traces -obtained from external tools, e.g. RTL from LAAS-CNRS and CADP -from INRIA Rhone-Alpes. + This software is a computer program whose purpose is to allow the + edition of TURTLE analysis, design and deployment diagrams, to + allow the generation of RT-LOTOS or Java code from this diagram, + and at last to allow the analysis of formal validation traces + obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + from INRIA Rhone-Alpes. -This software is governed by the CeCILL license under French law and -abiding by the rules of distribution of free software. You can use, -modify and/ or redistribute the software under the terms of the CeCILL -license as circulated by CEA, CNRS and INRIA at the following URL -"http://www.cecill.info". + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". -As a counterpart to the access to the source code and rights to copy, -modify and redistribute granted by the license, users are provided only -with a limited warranty and the software's author, the holder of the -economic rights, and the successive licensors have only limited -liability. + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited + liability. -In this respect, the user's attention is drawn to the risks associated -with loading, using, modifying and/or developing or reproducing the -software by the user in light of its specific status of free software, -that may mean that it is complicated to manipulate, and that also -therefore means that it is reserved for developers and experienced -professionals having in-depth computer knowledge. Users are therefore -encouraged to load and test the software's suitability as regards their -requirements in conditions enabling the security of their systems and/or -data to be ensured and, more generally, to use and operate it in the -same conditions as regards security. + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. -The fact that you are presently reading this means that you have had -knowledge of the CeCILL license and that you accept its terms. + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. -/** - * Class DiagramTreeRenderer - * Icons and tooltiptext for the main tree - * Creation: 15/12/2003 - * @version 1.0 15/12/2003 - * @author Ludovic APVRILLE - * @see - */ + /** + * Class DiagramTreeRenderer + * Icons and tooltiptext for the main tree + * Creation: 15/12/2003 + * @version 1.0 15/12/2003 + * @author Ludovic APVRILLE + * @see + */ package ui.tree; @@ -83,31 +83,32 @@ import ui.avatarcd.*; import ui.diplodocusmethodology.*; import ui.avatarmethodology.*; +import ui.sysmlsecmethodology.*; public class DiagramTreeRenderer extends DefaultTreeCellRenderer { - + public DiagramTreeRenderer() { - + } - + public Component getTreeCellRendererComponent( - JTree tree, - Object value, - boolean sel, - boolean expanded, - boolean leaf, - int row, - boolean hasFocus) { - + JTree tree, + Object value, + boolean sel, + boolean expanded, + boolean leaf, + int row, + boolean hasFocus) { + super.getTreeCellRendererComponent( - tree, value, sel, - expanded, leaf, row, - hasFocus); + tree, value, sel, + expanded, leaf, row, + hasFocus); if (value instanceof AvatarDesignPanel) { - setIcon(IconManager.imgic80); + setIcon(IconManager.imgic80); setToolTipText("Avatar Design"); - } else if (value instanceof AvatarAnalysisPanel) { + } else if (value instanceof AvatarAnalysisPanel) { setIcon(IconManager.imgic18); setToolTipText("Avatar Analysis"); } else if (value instanceof DiplodocusMethodologyPanel) { @@ -122,6 +123,12 @@ public class DiagramTreeRenderer extends DefaultTreeCellRenderer { } else if (value instanceof AvatarMethodologyDiagramPanel) { setIcon(IconManager.imgic99); setToolTipText("Avatar Methodology"); + } else if (value instanceof SysmlsecMethodologyPanel) { + setIcon(IconManager.imgic99); + setToolTipText("SysMLSec Methodology"); + } else if (value instanceof SysmlsecMethodologyDiagramPanel) { + setIcon(IconManager.imgic99); + setToolTipText("SysMLSec Methodology"); } else if (value instanceof TMLCommunicationPatternPanel) { setIcon(IconManager.imgic18); setToolTipText("DIPLODOCUS Communication Patterns"); @@ -193,19 +200,19 @@ public class DiagramTreeRenderer extends DefaultTreeCellRenderer { setToolTipText("TURTLE Use Case Diagram"); } else if (value instanceof TDeploymentDiagramPanel) { setIcon(IconManager.imgic60); - setToolTipText("TURTLE Deployment Diagram"); + setToolTipText("TURTLE Deployment Diagram"); } else if (value instanceof NCDiagramPanel) { setIcon(IconManager.imgic60); - setToolTipText("NC Diagram"); + setToolTipText("NC Diagram"); } else if (value instanceof RequirementDiagramPanel) { setIcon(IconManager.imgic1000); - setToolTipText("TURTLE Requirement Diagram"); + setToolTipText("TURTLE Requirement Diagram"); } else if (value instanceof AttackTreeDiagramPanel) { setIcon(IconManager.imgic1074); - setToolTipText("Attack Tree Diagram (SysML Parametric diagram)"); + setToolTipText("Attack Tree Diagram (SysML Parametric diagram)"); } else if (value instanceof EBRDDPanel) { setIcon(IconManager.imgic1058); - setToolTipText("Event-Based Requirement Description Diagram"); + setToolTipText("Event-Based Requirement Description Diagram"); } else if (value instanceof TActivityDiagramPanel) { setIcon(IconManager.imgic15); setToolTipText("TURTLE Activity Diagram of " + value.toString()); @@ -262,11 +269,11 @@ public class DiagramTreeRenderer extends DefaultTreeCellRenderer { setIcon(IconManager.imgic322); setToolTipText(value.toString()); } else if (value instanceof Invariant) { - Invariant inv = (Invariant)value; + Invariant inv = (Invariant)value; setIcon(IconManager.imgic5110); setToolTipText("value=" + inv.getValue() + " tokenValue=" + inv.getTokenValue()); } else if (value instanceof InvariantSynchro) { - InvariantSynchro is = (InvariantSynchro)value; + InvariantSynchro is = (InvariantSynchro)value; setIcon(IconManager.imgic5004); setToolTipText("name=" + is.getName() + " from=" + is.getFrom() + " to=" + is.getTo()); } else if (value instanceof InvariantDataTree) { @@ -276,33 +283,33 @@ public class DiagramTreeRenderer extends DefaultTreeCellRenderer { setIcon(IconManager.imgic5106); setToolTipText(value.toString()); } else if (value instanceof AvatarSignal) { - if (((AvatarSignal)value).getInOut() == AvatarSignal.OUT) { - setIcon(IconManager.imgic5050); - setToolTipText(value.toString()); - } else { - setIcon(IconManager.imgic5056); - setToolTipText(value.toString()); + if (((AvatarSignal)value).getInOut() == AvatarSignal.OUT) { + setIcon(IconManager.imgic5050); + setToolTipText(value.toString()); + } else { + setIcon(IconManager.imgic5056); + setToolTipText(value.toString()); } } else if (value instanceof AvatarMethod) { setIcon(IconManager.imgic5108); setToolTipText(value.toString()); - + } else if (value instanceof SearchTree) { setIcon(IconManager.imgic56); setToolTipText(value.toString()); - + } else if (value instanceof AvatarMADsPanel) { setIcon(IconManager.imgic5060); setToolTipText("Panel for Avatar Modeling Assumptions Diagram"); - + } else if (value instanceof AvatarMADPanel) { setIcon(IconManager.imgic5060); setToolTipText("Avatar Modeling Assumptions Diagram"); - + } else { setToolTipText(null); } - + return this; } } -- GitLab