00001 package edu.ksu.cis.bandera.bui.roboto;
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 import edu.ksu.cis.bandera.bui.session.datastructure.*;
00036 import javax.swing.*;
00037 import java.io.*;
00038 import java.util.*;
00039 import edu.ksu.cis.bandera.bui.*;
00040 import edu.ksu.cis.bandera.bui.counterexample.*;
00041 public class MrRoboto extends Thread {
00042 private Vector sessionNames;
00043 private java.lang.String sessionFile;
00044 private boolean dump;
00045 private boolean report;
00046 private String expectedPath;
00047
00048
00049
00050
00051
00052
00053
00054
00055 public MrRoboto(String sessionFile, Vector sessionNames, boolean dump, boolean report, String expectedPath) {
00056 this.sessionFile = sessionFile;
00057 this.sessionNames = sessionNames;
00058 this.dump = dump;
00059 this.report = report;
00060 this.expectedPath = expectedPath;
00061 }
00062
00063
00064
00065 public void run() {
00066
00067 System.out.println("MrRoboto is running...");
00068 Driver.initRoboto(dump, report, expectedPath);
00069 while (BUI.bui == null) {
00070 try {
00071 sleep(10000);
00072 } catch (Exception e) {
00073 }
00074 }
00075
00076
00077 System.out.println("MrRoboto opened the session file...");
00078 BUI.bui.openMenuItemRoboto(sessionFile);
00079
00080
00081 System.out.println("MrRoboto opened the session manager...");
00082 BUI.bui.managerMenuItem_ActionEvents();
00083
00084
00085
00086 for (Iterator i = sessionNames.iterator(); i.hasNext();) {
00087 Session s = BUI.sessions.getSession((String) i.next());
00088 System.out.println("MrRoboto told Bandera to run the " + s.getName() + " session...");
00089 BUI.bui.manager.getSessionsList().setSelectedValue(s, true);
00090
00091 BUI.bui.manager.activateButton_ActionEvents();
00092
00093 System.out.println("MrRoboto is taking a nap while Bandera is running the " + s.getName() + " session");
00094 BUI.bui.runToolBarButton_ActionEvents();
00095
00096 while (BUI.isExecuting) {
00097 try {
00098 sleep(5000);
00099 } catch (Exception e) {
00100 }
00101 }
00102 }
00103 System.out.println("MrRoboto's job is finished... back to sleep.");
00104 }
00105 }