Browse Source

GUISimulator, 'Export path': Optionally export reward information as well

For 'Export path' from the simulator in the GUI:

If there are reward structures in the model, ask the user whether the
exported path should include the reward information as well.
accumulation-v4.7
Joachim Klein 7 years ago
parent
commit
cd8fc128d5
  1. 8
      prism/src/userinterface/simulator/GUISimulator.java

8
prism/src/userinterface/simulator/GUISimulator.java

@ -761,10 +761,16 @@ public class GUISimulator extends GUIPlugin implements MouseListener, ListSelect
public void a_exportPath()
{
try {
boolean exportRewards = false;
if (parsedModel != null && parsedModel.getNumRewardStructs() > 0) {
exportRewards = (question("Export the path with or without reward information?", new String[]{"With rewards", "Without rewards"}) == 0);
}
if (showSaveFileDialog(textFilter) != JFileChooser.APPROVE_OPTION)
return;
setComputing(true);
engine.exportPath(getChooserFile());
engine.exportPath(getChooserFile(), exportRewards);
} catch (PrismException e) {
error(e.getMessage());
} finally {

Loading…
Cancel
Save