Commit ba921456 authored by Ludovic Apvrille's avatar Ludovic Apvrille

--no commit message

--no commit message
parent ec557d60
......@@ -72,6 +72,9 @@ all:
svn commit build.txt src/ui/DefaultText.java -m 'update on build version: builder.txt'
$(JAVAC) $(CLASSPATH) $(TTOOL_SRC) $(TTOOL_SRC)/*.java
basic:
$(JAVAC) $(CLASSPATH) $(TTOOL_SRC) $(TTOOL_SRC)/*.java
ttooljar_std:
rm -f $(TTOOL_BIN)/$(TTOOL_BINARY)
cp $(TTOOL_SRC)/ui/images/$(STD_LOGO) $(TTOOL_SRC)/ui/images/$(LOGO)
......
......@@ -608,7 +608,7 @@ public class MappedSystemCTask {
MCResult = makeCommands(currElem.getNextElement(i), false, retElseElement,nextCommandCollection,null);
else
MCResult = makeCommands(currElem.getNextElement(i), false, retElement,nextCommandCollection,null);
if (nextCommandCollection.funcs.isEmpty()){
if (nextCommandCollection.funcs.length() == 0){
//System.out.println("NO content has been added to "+ code2);
code += "{\n#ifdef ADD_COMMENTS\naddComment(new Comment(_endLastTransaction,0," + commentNum + "));\n#endif\nreturn " + returnIndex + SCCR +"}" + CR;
commentText+="_comment[" + commentNum + "]=std::string(\"Branch taken: " + code2 + "\");\n";
......
......@@ -449,7 +449,14 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.addMouseListener(mgui.mouseHandler);
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_STAT_SAVED_AUT]);
menuItem.addMouseListener(mgui.mouseHandler);
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();
......
......@@ -694,11 +694,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener {
break;
case RGAUTPROJDOT_OK:
actions[TGUIAction.ACT_VIEW_STAT_AUTPROJ].setEnabled(true);
actions[TGUIAction.ACT_VIEW_PM_AUTPROJ].setEnabled(true);
actions[TGUIAction.ACT_SAVE_AUTPROJ].setEnabled(true);
actions[TGUIAction.ACT_VIEW_RGAUTPROJDOT].setEnabled(true);
break;
case RGAUTPROJDOT_KO:
actions[TGUIAction.ACT_VIEW_STAT_AUTPROJ].setEnabled(false);
actions[TGUIAction.ACT_VIEW_PM_AUTPROJ].setEnabled(false);
actions[TGUIAction.ACT_SAVE_AUTPROJ].setEnabled(false);
actions[TGUIAction.ACT_VIEW_RGAUTPROJDOT].setEnabled(false);
break;
......@@ -3199,6 +3201,17 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener {
t.go();
}
public void showPMAUT(String title, String data) {
System.out.println("Power management analysis");
/*JFrameStatistics jfs = new JFrameStatistics(title, data);
jfs.setIconImage(IconManager.img8);
jfs.setSize(600, 600);
GraphicLib.centerOnParent(jfs);
jfs.setVisible(true);*/
//ThreadGUIElement t = new ThreadGUIElement(frame, 0, title, data, "Analyzing graph... Please wait");
//t.go();
}
public void NC() {
System.out.println("NC");
JFrameNC jfnc = new JFrameNC("Network calculus", gtm.getNCS());
......@@ -3230,6 +3243,22 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener {
showAUT("Analysis on " + graph[0], graph[1]);
}
}
public void pmAUT() {
showPMAUT("Power Management Analysis on the last RG (AUT format)", gtm.getLastTextualRGAUT());
}
public void pmAUTProj() {
showPMAUT("Power Management Analysis on the last minimized RG (AUT format)", gtm.getLastTextualRGAUTProj());
}
public void pmSavedAUT() {
//System.out.println("toto");
String graph[] = loadAUTGraph();
if (graph != null) {
showPMAUT("Power Management Analysis on " + graph[0], graph[1]);
}
}
public void showFormalSpecification() {
if (gtm.getLanguageID() == GTURTLEModeling.RT_LOTOS) {
......@@ -5260,7 +5289,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener {
statAUTProj();
} else if (command.equals(actions[TGUIAction.ACT_VIEW_STAT_SAVED_AUT].getActionCommand())) {
statSavedAUT();
} else if (command.equals(actions[TGUIAction.ACT_VIEW_RTLOTOS].getActionCommand())) {
} else if (command.equals(actions[TGUIAction.ACT_VIEW_PM_AUT].getActionCommand())) {
pmAUT();
} else if (command.equals(actions[TGUIAction.ACT_VIEW_PM_AUTPROJ].getActionCommand())) {
pmAUTProj();
} else if (command.equals(actions[TGUIAction.ACT_VIEW_PM_SAVED_AUT].getActionCommand())) {
pmSavedAUT();
} else if (command.equals(actions[TGUIAction.ACT_VIEW_RTLOTOS].getActionCommand())) {
showFormalSpecification();
} else if (command.equals(actions[TGUIAction.ACT_VIEW_JAVA].getActionCommand())) {
showJavaCode();
......
......@@ -294,6 +294,7 @@ public class TGUIAction extends AbstractAction {
public static final int ACT_DEADLOCK_SEEKER_AUT = 75;
public static final int ACT_DEADLOCK_SEEKER_SAVED_AUT = 76;
public static final int ACT_ONECLICK_LOTOS_RG = 210;
public static final int ACT_ONECLICK_RTLOTOS_RG = 211;
......@@ -325,6 +326,10 @@ public class TGUIAction extends AbstractAction {
public static final int ACT_VIEW_BIRDEYES = 115;
public static final int ACT_VIEW_BIRDEYES_EMB = 116;
public static final int ACT_VIEW_WAVE = 153;
public static final int ACT_VIEW_PM_AUT = 265;
public static final int ACT_VIEW_PM_AUTPROJ = 266;
public static final int ACT_VIEW_PM_SAVED_AUT = 267;
public static final int UML_NOTE = 42;
......@@ -374,7 +379,7 @@ public class TGUIAction extends AbstractAction {
public static final int PRUEBA_1 = 205;
public static final int NB_ACTION = 265;
public static final int NB_ACTION = 268;
private static final TAction [] actions = new TAction[NB_ACTION];
......@@ -491,7 +496,9 @@ public class TGUIAction extends AbstractAction {
actions[ACT_VIEW_STAT_AUT] = new TAction("viewstataut-command", "Analysis (last AUT graph)", IconManager.imgic28, IconManager.imgic29, "Analysis (last AUT graph)", "Analysis on the last generated reachability graph generated in AUT (Aldebaran) format", 0);
actions[ACT_VIEW_STAT_AUTPROJ] = new TAction("viewstatautproj-command", "Analysis (last minimized AUT graph)", IconManager.imgic28, IconManager.imgic29, "Analysis (last minimized AUT graph)", "Analysis on the last minimized reachability graph in AUT (Aldebaran) format", 0);
actions[ACT_VIEW_STAT_SAVED_AUT] = new TAction("viewstatsavedautproj-command", "Analysis (saved AUT graph)", IconManager.imgic28, IconManager.imgic29, "Analysis (saved AUT graph)", "Analysis on a graph saved in AUT (Aldebaran) format", 0);
actions[ACT_VIEW_PM_AUT] = new TAction("viewpmaut-command", "Power Management Analysis (last AUT graph)", IconManager.imgic28, IconManager.imgic29, "Power Management Analysis (last AUT graph)", "Power Management Analysis on the last generated reachability graph generated in AUT (Aldebaran) format", 0);
actions[ACT_VIEW_PM_AUTPROJ] = new TAction("viewpmautproj-command", "Power Management Analysis (last minimized AUT graph)", IconManager.imgic28, IconManager.imgic29, "Power Management Analysis (last minimized AUT graph)", "Power Management Analysis on the last minimized reachability graph in AUT (Aldebaran) format", 0);
actions[ACT_VIEW_PM_SAVED_AUT] = new TAction("viewpmsavedautproj-command", "Power Management Analysis (saved AUT graph)", IconManager.imgic28, IconManager.imgic29, "Power Management Analysis (saved AUT graph)", "Power Management Analysis on a graph saved in AUT (Aldebaran) format", 0);
actions[ACT_VIEW_JAVA] = new TAction("view-java", "Display Java code", IconManager.imgic38, IconManager.imgic39, "Display Java code", "Display the java code of the pointed component", 0);
actions[ACT_VIEW_RTLOTOS] = new TAction("view-rtlotos", "Show last formal specification", IconManager.imgic302, IconManager.imgic302, "Show formal specification", "Display the lastest generated formal specification", 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment