Browse Source

Verification/simulation in GUI now shows number of warnings in the result window (if it's nonzero)

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@4072 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Vojtech Forejt 14 years ago
parent
commit
1e49dd0197
  1. 12
      prism/src/userinterface/properties/GUIProperty.java
  2. 19
      prism/src/userinterface/properties/GUIPropertyResultDialog.java
  3. 2
      prism/src/userinterface/properties/computation/ModelCheckThread.java
  4. 2
      prism/src/userinterface/properties/computation/SimulateModelCheckThread.java

12
prism/src/userinterface/properties/GUIProperty.java

@ -86,6 +86,7 @@ public class GUIProperty
private String comment; // The property's comment
private Result result; // Result of model checking etc. (if done, null if not)
private int numberOfWarnings; // Result of model checking etc. (if done, null if not)
private String parseError; // Parse error (if property is invalid)
private String method; // Method used (verification, simulation)
@ -194,6 +195,12 @@ public class GUIProperty
return result;
}
public int getNumberOfWarnings()
{
return this.numberOfWarnings;
}
public String getResultString()
{
return result == null ? "Unknown" : result.getResultString();
@ -280,6 +287,11 @@ public class GUIProperty
}
}
public void setNumberOfWarnings(int n)
{
this.numberOfWarnings = n;
}
public void setMethodString(String method)
{
this.method = (method == null) ? "<none>" : method;

19
prism/src/userinterface/properties/GUIPropertyResultDialog.java

@ -52,6 +52,13 @@ public class GUIPropertyResultDialog extends javax.swing.JDialog
constantsLabel.setText(gp.getConstantsString());
methodLabel.setText(gp.getMethodString());
resultLabel.setText(gp.getResultString());
if (gp.getNumberOfWarnings() == 0) {
warningLabel.setText("");
} else if (gp.getNumberOfWarnings() == 1) {
warningLabel.setText(gp.getNumberOfWarnings() + " warning (see log)");
} else {
warningLabel.setText(gp.getNumberOfWarnings() + " warnings (see log)");
}
this.gp = gp;
this.gmp = gmp;
@ -96,6 +103,9 @@ public class GUIPropertyResultDialog extends javax.swing.JDialog
jLabel8.setFont(new Font(cur.getName(), Font.BOLD, cur.getSize()));
resultLabel = new javax.swing.JLabel();
jPanel8 = new javax.swing.JPanel();
warningLabel = new javax.swing.JLabel();
cur = warningLabel.getFont();
warningLabel.setFont(new Font(cur.getName(), Font.BOLD, cur.getSize()));
jPanel9 = new javax.swing.JPanel();
jPanel11 = new javax.swing.JPanel();
jPanel12 = new javax.swing.JPanel();
@ -233,6 +243,14 @@ public class GUIPropertyResultDialog extends javax.swing.JDialog
gridBagConstraints.gridy = 12;
jPanel1.add(jPanel9, gridBagConstraints);
warningLabel.setText("dummy dummy");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 13;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
jPanel1.add(warningLabel, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
@ -292,6 +310,7 @@ public class GUIPropertyResultDialog extends javax.swing.JDialog
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel warningLabel;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel10;
private javax.swing.JPanel jPanel11;

2
prism/src/userinterface/properties/computation/ModelCheckThread.java

@ -184,6 +184,8 @@ public class ModelCheckThread extends GUIComputationThread
gp.setResult(result);
gp.setMethodString("Verification");
gp.setConstants(definedMFConstants, definedPFConstants);
gp.setNumberOfWarnings(prism.getMainLog().getNumberOfWarnings());
prism.getMainLog().resetNumberOfWarnings();
parent.repaintList();
}

2
prism/src/userinterface/properties/computation/SimulateModelCheckThread.java

@ -164,6 +164,8 @@ public class SimulateModelCheckThread extends GUIComputationThread
gp.setResult((results == null) ? new Result(resultError) : results[i]);
gp.setMethodString("Simulation");
gp.setConstants(definedMFConstants, definedPFConstants);
gp.setNumberOfWarnings(prism.getMainLog().getNumberOfWarnings());
prism.getMainLog().resetNumberOfWarnings();
}
}
// do each property individually

Loading…
Cancel
Save