diff --git a/plugins/TestingList.java b/plugins/TestingList.java index b943a76..1bd92e8 100644 --- a/plugins/TestingList.java +++ b/plugins/TestingList.java @@ -344,27 +344,9 @@ public class TestingList extends Panel { }// //GEN-END:initComponents private void jButtonRunActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRunActionPerformed - if(this.jButtonRun.getToolTipText().equals("Run selected tests")){ - Object state = null; - try { - state = eval("state"); - } catch (ApplicationStateException ex) { - SwingUtils.showMessage(this, "jButtonRunActionPerformed()", ex.toString()); - } catch (ScriptException ex) { - SwingUtils.showMessage(this, "jButtonRunActionPerformed()", ex.toString()); - } catch (IOException ex) { - SwingUtils.showMessage(this, "jButtonRunActionPerformed()", ex.toString()); - } catch (Controller.ControllerStateException ex) { - SwingUtils.showMessage(this, "jButtonRunActionPerformed()", ex.toString()); - } catch (InterruptedException ex) { - SwingUtils.showMessage(this, "jButtonRunActionPerformed()", ex.toString()); - } catch (TaskRunningException ex) { - SwingUtils.showMessage(this, "jButtonRunActionPerformed()", ex.toString()); - } - if(state.toString().equals("Ready")){ + if(this.jButtonRun.getToolTipText().equals("Run selected tests")){ setButtonToStart(); executeTest(0); - } } else{ setButtonToStop(); @@ -422,24 +404,18 @@ public class TestingList extends Panel { //oopen the log file using one of th default OS text reades private void jButtonOpenLogActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOpenLogActionPerformed + String cmd; if (System.getProperty("os.name").toLowerCase().contains("windows")) { - String cmd; cmd = "notepad.exe " + TESTS_LOG_DEFAULT_DIR; - try { - Runtime.getRuntime().exec(cmd); - } catch (IOException ex) { - SwingUtils.showMessage(this, "jButtonOpenLogActionPerformed()", "jButtonOpenLogActionPerformed() "+ ex.toString() + " \nPlease open the file manually. \nFile dir: "+TESTS_LOG_DEFAULT_DIR); - Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex); - } } else { - File log = new File(TESTS_LOG_DEFAULT_DIR); - try { - Desktop.getDesktop().edit(log); - } catch (IOException ex) { - SwingUtils.showMessage(this, "jButtonOpenLogActionPerformed()", "jButtonOpenLogActionPerformed() "+ ex.toString() + " \nPlease open the file manually. \nFile dir: "+TESTS_LOG_DEFAULT_DIR); - Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex); - } + cmd = "nedit " + TESTS_LOG_DEFAULT_DIR; } + try { + Runtime.getRuntime().exec(cmd); + } catch (IOException ex) { + SwingUtils.showMessage(this, "jButtonOpenLogActionPerformed()", "jButtonOpenLogActionPerformed() "+ ex.toString() + " \nPlease open the file manually. \nFile dir: "+TESTS_LOG_DEFAULT_DIR); + Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex); + } }//GEN-LAST:event_jButtonOpenLogActionPerformed private void jTable1KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTable1KeyReleased