Merge lp:~tapaal-contributor/tapaal/Remove-ExportPNXML-button-1718642 into lp:tapaal

Proposed by Peter Haahr Taankvist
Status: Merged
Approved by: Jiri Srba
Approved revision: 966
Merged at revision: 967
Proposed branch: lp:~tapaal-contributor/tapaal/Remove-ExportPNXML-button-1718642
Merge into: lp:tapaal
Diff against target: 35 lines (+5/-5)
1 file modified
src/pipe/gui/widgets/CTLQueryDialog.java (+5/-5)
To merge this branch: bzr merge lp:~tapaal-contributor/tapaal/Remove-ExportPNXML-button-1718642
Reviewer Review Type Date Requested Status
Jiri Srba Approve
Review via email: mp+349098@code.launchpad.net

Description of the change

Diasbled button if reductionOption was VerifyPN and made sure it was not updated.

To post a comment you must log in.
Revision history for this message
Jiri Srba (srba) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/pipe/gui/widgets/CTLQueryDialog.java'
2--- src/pipe/gui/widgets/CTLQueryDialog.java 2018-05-13 14:57:15 +0000
3+++ src/pipe/gui/widgets/CTLQueryDialog.java 2018-07-08 17:00:36 +0000
4@@ -314,7 +314,6 @@
5 private final static String TOOL_TIP_SAVE_UPPAAL_BUTTON = "Export an xml file that can be opened in UPPAAL GUI.";
6 private final static String TOOL_TIP_SAVE_COMPOSED_BUTTON = "Export an xml file of composed net and approximated net if enabled";
7 private final static String TOOL_TIP_SAVE_TAPAAL_BUTTON = "Export an xml file that can be used as input for the TAPAAL engine.";
8- private final static String TOOL_TIP_SAVE_PN_BUTTON = "Export an xml file that can be used as input for the untimed Petri net engine.";
9
10 //Tool tips for approximation panel
11 private final static String TOOL_TIP_APPROXIMATION_METHOD_NONE = "No approximation method is used.";
12@@ -1106,7 +1105,8 @@
13 Point location = guiDialog.getLocation();
14 searchOptionsPanel.setVisible(advancedView);
15 reductionOptionsPanel.setVisible(advancedView);
16- saveUppaalXMLButton.setVisible(advancedView);
17+ if(getReductionOption() != ReductionOption.VerifyPN)
18+ saveUppaalXMLButton.setVisible(advancedView);
19 openComposedNetButton.setVisible(advancedView);
20
21 if(advancedView){
22@@ -2317,10 +2317,10 @@
23
24 private void refreshExportButtonText() {
25 ReductionOption reduction = getReductionOption();
26- if (reduction == null) {saveUppaalXMLButton.setEnabled(false);}
27+ if (reduction == null || reduction == ReductionOption.VerifyPN) {saveUppaalXMLButton.setEnabled(false);}
28 else {
29- saveUppaalXMLButton.setText(reduction == ReductionOption.VerifyTAPN || reduction == ReductionOption.VerifyTAPNdiscreteVerification ? EXPORT_VERIFYTAPN_BTN_TEXT : reduction == ReductionOption.VerifyPN ? EXPORT_VERIFYPN_BTN_TEXT : EXPORT_UPPAAL_BTN_TEXT);
30- saveUppaalXMLButton.setToolTipText(reduction == ReductionOption.VerifyTAPN || reduction == ReductionOption.VerifyTAPNdiscreteVerification ? TOOL_TIP_SAVE_TAPAAL_BUTTON : reduction == ReductionOption.VerifyPN ? TOOL_TIP_SAVE_PN_BUTTON : TOOL_TIP_SAVE_UPPAAL_BUTTON);
31+ saveUppaalXMLButton.setText(reduction == ReductionOption.VerifyTAPN || reduction == ReductionOption.VerifyTAPNdiscreteVerification ? EXPORT_VERIFYTAPN_BTN_TEXT : EXPORT_UPPAAL_BTN_TEXT);
32+ saveUppaalXMLButton.setToolTipText(reduction == ReductionOption.VerifyTAPN || reduction == ReductionOption.VerifyTAPNdiscreteVerification ? TOOL_TIP_SAVE_TAPAAL_BUTTON : TOOL_TIP_SAVE_UPPAAL_BUTTON);
33 saveUppaalXMLButton.setEnabled(true);
34 }
35 }

Subscribers

People subscribed via source and target branches