Browse Source

(Hopefully) a fix for occasional freezing of GUI when plotting many quick results.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@74 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 19 years ago
parent
commit
d0a7b5005d
  1. 28
      prism/src/userinterface/properties/GUIExperiment.java

28
prism/src/userinterface/properties/GUIExperiment.java

@ -53,6 +53,10 @@ public class GUIExperiment
private boolean isApmc; private boolean isApmc;
private Values definedMFConstants;
private Values definedPFConstants;
private Object res;
/** Creates a new instance of GUIExperiment */ /** Creates a new instance of GUIExperiment */
public GUIExperiment(GUIExperimentTable table, GUIMultiProperties guiProp, PropertiesFile prop, UndefinedConstants cons, ModulesFile mod, String modString, boolean useSimulation) public GUIExperiment(GUIExperimentTable table, GUIMultiProperties guiProp, PropertiesFile prop, UndefinedConstants cons, ModulesFile mod, String modString, boolean useSimulation)
{ {
@ -223,14 +227,16 @@ public class GUIExperiment
{ {
int i, k; int i, k;
boolean clear = true; boolean clear = true;
Values definedMFConstants = null, definedPFConstants = null;
Model model = null; Model model = null;
Object res;
PCTLFormula propertyToCheck = propertiesFile.getProperty(0); PCTLFormula propertyToCheck = propertiesFile.getProperty(0);
SimulationInformation info = null; SimulationInformation info = null;
boolean reuseInfo = false, reuseInfoAsked = false; boolean reuseInfo = false, reuseInfoAsked = false;
definedMFConstants = null;
definedPFConstants = null;
res= null;
try try
{ {
SwingUtilities.invokeAndWait(new Runnable() SwingUtilities.invokeAndWait(new Runnable()
@ -429,12 +435,18 @@ public class GUIExperiment
res = e; res = e;
} }
// store result of model checking // store result of model checking
try {
setResult(definedMFConstants, definedPFConstants, res);
}
catch (PrismException e) {
error("Problem storing results");
}
SwingUtilities.invokeAndWait(new Runnable()
{
public void run()
{
try {
setResult(definedMFConstants, definedPFConstants, res);
}
catch (PrismException e) {
error("Problem storing results");
}
}
});
table.progressChanged(); table.progressChanged();

Loading…
Cancel
Save