diff --git a/modeling/AVATAR/testprobabilities.xml b/modeling/AVATAR/testprobabilities.xml index d20d66d384e2b3d1b27663bc1ea5ac3ec5e8c3be..4da3aeb93e24c44dfa540f774188c3eda22d45bb 100644 --- a/modeling/AVATAR/testprobabilities.xml +++ b/modeling/AVATAR/testprobabilities.xml @@ -7,7 +7,7 @@ <MainCode value="void __user_init() {"/> <MainCode value="}"/> <Optimized value="true" /> -<Validated value="Reader;Producer;" /> +<Validated value="" /> <Ignored value="" /> <CONNECTOR type="5002" id="2" > diff --git a/src/main/java/myutil/GraphicLib.java b/src/main/java/myutil/GraphicLib.java index 887263b21564bfd4aebed2143cb7ad40c2b5c3c5..cc2d1090a8376395be0033db05266185b87ebf87 100755 --- a/src/main/java/myutil/GraphicLib.java +++ b/src/main/java/myutil/GraphicLib.java @@ -529,6 +529,7 @@ public final class GraphicLib { Window parent = w.getOwner(); if (parent == null) { + //TraceManager.addDev("Centering on screen"); centerOnScreen(w); return; } diff --git a/src/main/java/ui/TGUIAction.java b/src/main/java/ui/TGUIAction.java index 896cf977cad9da28d7653f8a2738734aa45c6b57..da226595e59174de679521e4ff109dd9d00080ec 100755 --- a/src/main/java/ui/TGUIAction.java +++ b/src/main/java/ui/TGUIAction.java @@ -1183,10 +1183,10 @@ public class TGUIAction extends AbstractAction { actions[ASMD_CONNECTOR] = new TAction("add-asmd-connector", "Connect two operators together", IconManager.imgic202, IconManager.imgic202, "Connect two operators together", "Connect two operators of the currently opened AVATAR state machine diagram", 0); actions[ASMD_START] = new TAction("add-asmd-start", "Add Start state", IconManager.imgic222, IconManager.imgic222, "Start", "Add a start state to the currently opened AVATAR state machine diagram", 0); actions[ASMD_STOP] = new TAction("add-asmd-stop", "Add Stop", IconManager.imgic210, IconManager.imgic210, "Stop", "Add a termination state to the currently opened AVATAR state machine diagram", 0); - actions[ASMD_SEND_SIGNAL] = new TAction("add-asmd-sendsignal", "Send signal", IconManager.imgic904, IconManager.imgic904, "Send signal", "Add a send signal operator to the currently opened AVATAR state machine diagram", 0); - actions[ASMD_RECEIVE_SIGNAL] = new TAction("add-asmd-receivesignal", "Receive signal", IconManager.imgic908, IconManager.imgic908, "Receive signal", "Add a receive signal operator to the currently opened AVATAR state machine diagram", 0); + actions[ASMD_SEND_SIGNAL] = new TAction("add-asmd-sendsignal", "Send signal", IconManager.imgic2014, IconManager.imgic2014, "Send signal", "Add a send signal operator to the currently opened AVATAR state machine diagram", 0); + actions[ASMD_RECEIVE_SIGNAL] = new TAction("add-asmd-receivesignal", "Receive signal", IconManager.imgic2016, IconManager.imgic2016, "Receive signal", "Add a receive signal operator to the currently opened AVATAR state machine diagram", 0); // TODO: change icon - actions[ASMD_LIBRARY_FUNCTION_CALL] = new TAction("add-asmd-libraryfunctioncall", "Library function call", IconManager.imgic904, IconManager.imgic904, "Library function call", "Add a library function call to the currently opened AVATAR state machine diagram", 0); + actions[ASMD_LIBRARY_FUNCTION_CALL] = new TAction("add-asmd-libraryfunctioncall", "Library function call", IconManager.imgic2018, IconManager.imgic2018, "Library function call", "Add a library function call to the currently opened AVATAR state machine diagram", 0); actions[ASMD_PARALLEL] = new TAction("add-asmd-parallel", "Parallel", IconManager.imgic206, IconManager.imgic206, "Parallel", "Add a parallel operator to the currently opened AVATAR state machine diagram", 0); actions[ASMD_STATE] = new TAction("add-asmd-state", "State", IconManager.imgic5036, IconManager.imgic5036, "State", "Add a new state to the currently opened AVATAR state machine diagram", 0); actions[ASMD_CHOICE] = new TAction("add-asmd-choice", "Add Choice", IconManager.imgic208, IconManager.imgic208, "Choice", "Add a choice - non-deterministic or guarded - to the currently opened AVATAR state machine diagram", 0); diff --git a/src/main/java/ui/avatarsmd/AvatarSMDConnector.java b/src/main/java/ui/avatarsmd/AvatarSMDConnector.java index f5cb21a8f5a0fd92cf446268c715540ed5eccaf0..47c3a2ce07471e284f3be123f54aad5f7688b8c9 100644 --- a/src/main/java/ui/avatarsmd/AvatarSMDConnector.java +++ b/src/main/java/ui/avatarsmd/AvatarSMDConnector.java @@ -56,7 +56,7 @@ import java.util.Vector; * @author Ludovic APVRILLE * @version 1.0 06/04/2010 */ -public class AvatarSMDConnector extends TGConnectorWithCommentConnectionPoints { +public class AvatarSMDConnector extends TGConnectorWithCommentConnectionPoints implements WithAttributes { protected int arrowLength = 10; //protected AvatarSMDTransitionInfo myTransitionInfo; @@ -216,4 +216,8 @@ public class AvatarSMDConnector extends TGConnectorWithCommentConnectionPoints { public String getCodeToInclude() { return getAvatarSMDTransitionInfo().getCodeToInclude(); } + + public String getAttributes() { + return getAvatarSMDTransitionInfo().getAttributes(); + } } diff --git a/src/main/java/ui/avatarsmd/AvatarSMDPanel.java b/src/main/java/ui/avatarsmd/AvatarSMDPanel.java index 9c79af3ada53883f816f0611c4c1f06339956e31..e8c3bbbdd1f58d1b814cbc5fd12189cc4c2bae55 100755 --- a/src/main/java/ui/avatarsmd/AvatarSMDPanel.java +++ b/src/main/java/ui/avatarsmd/AvatarSMDPanel.java @@ -62,7 +62,7 @@ public class AvatarSMDPanel extends TDiagramPanel implements TDPWithAttributes { addMouseListener(tdmm); addMouseMotionListener(tdmm);*/ - attributesOn = PARTIAL; + attributesOn = NORMAL; } public boolean actionOnDoubleClick(TGComponent tgc) { diff --git a/src/main/java/ui/avatarsmd/AvatarSMDTransitionInfo.java b/src/main/java/ui/avatarsmd/AvatarSMDTransitionInfo.java index 6a2d54ad2363745fb93f55fd4718e67df672a401..9b4dccb18c63cff04220d36d52e75bb54d9d7813 100755 --- a/src/main/java/ui/avatarsmd/AvatarSMDTransitionInfo.java +++ b/src/main/java/ui/avatarsmd/AvatarSMDTransitionInfo.java @@ -64,7 +64,7 @@ import java.util.Vector; * @author Ludovic APVRILLE * @version 1.0 12/04/2010 */ -public class AvatarSMDTransitionInfo extends TGCWithoutInternalComponent { +public class AvatarSMDTransitionInfo extends TGCWithoutInternalComponent implements WithAttributes { // private static String FILE_INFO = "(user files specified)"; // private static String CODE_INFO = "(user code specified)"; @@ -536,4 +536,20 @@ public class AvatarSMDTransitionInfo extends TGCWithoutInternalComponent { } return ret; } + + public String getAttributes() { + String attr = ""; + if (guard.length() > 0) + attr += " guard: " + getGuard(); + if (afterMin.length() > 0 || afterMax.length()>0) + attr += " delay: [" + afterMin + "," + afterMax + "] "; + if (probability.length() > 0) + attr += " weight:" + probability; + + for(String s: listOfActions) + attr += " / " + s; + + return attr; + + } } diff --git a/src/main/java/ui/tmldd/TMLArchiCPUNode.java b/src/main/java/ui/tmldd/TMLArchiCPUNode.java index 27f2c7e60876cda0d158990a55e700fd34495d35..fc245aeef465d2faa8dd7d949c46658986369e71 100755 --- a/src/main/java/ui/tmldd/TMLArchiCPUNode.java +++ b/src/main/java/ui/tmldd/TMLArchiCPUNode.java @@ -622,9 +622,11 @@ public class TMLArchiCPUNode extends TMLArchiNode implements SwallowTGComponent, public int getSliceTime(){ return sliceTime; } + public int getEncryption(){ return encryption; } + public String getAttributes() { String attr = ""; attr += "Nb of cores = " + nbOfCores + "\n"; diff --git a/src/main/java/ui/util/IconManager.java b/src/main/java/ui/util/IconManager.java index b15b9490b95b83f888d4262ccf6b5d15d0c20a9e..223eac477f8267517913e3419d926b5882f5230d 100755 --- a/src/main/java/ui/util/IconManager.java +++ b/src/main/java/ui/util/IconManager.java @@ -139,7 +139,8 @@ public class IconManager { // SMD diagram - public static ImageIcon imgic2000, imgic2002, imgic2004, imgic2006, imgic2008, imgic2010, imgic2012; + public static ImageIcon imgic2000, imgic2002, imgic2004, imgic2006, imgic2008, imgic2010, imgic2012, imgic2014, + imgic2016, imgic2018; // CSD diagram public static ImageIcon imgic2100, imgic2104, imgic2106, imgic2108, imgic2110; @@ -557,7 +558,9 @@ public class IconManager { private static String icon2008 = "prosmdsubmachine1.gif"; // private static String icon2010 = "actionstate.gif"; private static String icon2012 = "prosmdstate.gif"; - + private static String icon2014 = "sendsignal.gif"; + private static String icon2016 = "receivesignal.gif"; + private static String icon2018 = "functioncall.gif"; //CSD diagrams private static String icon2100 = "procsdcomponent.gif"; @@ -1031,6 +1034,9 @@ public class IconManager { imgic2008 = getIcon(icon2008); imgic2010 = getIcon(icon2010); imgic2012 = getIcon(icon2012); + imgic2014 = getIcon(icon2014); + imgic2016 = getIcon(icon2016); + imgic2018 = getIcon(icon2018); imgic2100 = getIcon(icon2100); //Delegate Ports removed, by Solange diff --git a/src/main/resources/ui/util/functioncall.gif b/src/main/resources/ui/util/functioncall.gif new file mode 100644 index 0000000000000000000000000000000000000000..120ca831ccdffc824b17e930b2a1ad5b4dcf84f1 Binary files /dev/null and b/src/main/resources/ui/util/functioncall.gif differ diff --git a/src/main/resources/ui/util/receivesignal.gif b/src/main/resources/ui/util/receivesignal.gif new file mode 100755 index 0000000000000000000000000000000000000000..5e9fb439fa2fe544fb7a3b6a3cec8ee99be23d95 Binary files /dev/null and b/src/main/resources/ui/util/receivesignal.gif differ diff --git a/src/main/resources/ui/util/sendsignal.gif b/src/main/resources/ui/util/sendsignal.gif new file mode 100755 index 0000000000000000000000000000000000000000..1f61428d8cb67ba4333c6427eea6b95af1699598 Binary files /dev/null and b/src/main/resources/ui/util/sendsignal.gif differ