From cd8fc128d550f7879de90c970de28cb67236d046 Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Fri, 14 Dec 2018 15:05:53 +0100 Subject: [PATCH] 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. --- prism/src/userinterface/simulator/GUISimulator.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/prism/src/userinterface/simulator/GUISimulator.java b/prism/src/userinterface/simulator/GUISimulator.java index 1ce269b6..811f8433 100644 --- a/prism/src/userinterface/simulator/GUISimulator.java +++ b/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 {