ASF Bugzilla – Attachment 36112 Details for
Bug 61635
Add a menu to restart JMeter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Add option to save file before restart
patch61635.patch (text/plain), 1.64 KB, created by
orimarko
on 2018-08-28 05:49:20 UTC
(
hide
)
Description:
Add option to save file before restart
Filename:
MIME Type:
Creator:
orimarko
Created:
2018-08-28 05:49:20 UTC
Size:
1.64 KB
patch
obsolete
>Index: src/core/org/apache/jmeter/gui/action/Restart.java >=================================================================== >--- src/core/org/apache/jmeter/gui/action/Restart.java (revision 1839171) >+++ src/core/org/apache/jmeter/gui/action/Restart.java (working copy) >@@ -65,7 +65,23 @@ > @Override > public void doAction(ActionEvent e) { > try { >- restartApplication(null); >+ ActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ActionNames.CHECK_DIRTY)); >+ if (GuiPackage.getInstance().isDirty()) { >+ int chosenOption = JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), JMeterUtils >+ .getResString("cancel_exit_to_save"), // $NON-NLS-1$ >+ JMeterUtils.getResString("save?"), // $NON-NLS-1$ >+ JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); >+ if (chosenOption == JOptionPane.NO_OPTION) { >+ restartApplication(null); >+ } else if (chosenOption == JOptionPane.YES_OPTION) { >+ ActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ActionNames.SAVE)); >+ if (!GuiPackage.getInstance().isDirty()) { >+ restartApplication(null); >+ } >+ } >+ } else { >+ restartApplication(null); >+ } > } catch (Exception ex) { > log.error("Error trying to restart: {}", ex.getMessage(), ex); > JOptionPane.showMessageDialog(GuiPackage.getInstance().getMainFrame(),
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 61635
: 36112