code cleanup.

This commit is contained in:
boccioli_m
2015-12-03 15:49:23 +01:00
parent 91b0669244
commit 82c5aed6d3
3 changed files with 12 additions and 46 deletions

View File

@@ -512,7 +512,7 @@ public class TestingList extends Panel {
String sStartSequence = String.valueOf(jTable1.getValueAt(row, COL.STARTSEQUENCE.ordinal()));
if(sStartSequence.equals(StartSequence.TOGETHER.toString())){
SwingUtils.OptionResult ret = SwingUtils.showOption(this, "Modify Start mode",
"A custom panel is active. Tests can only run in sequence (Start mode: 'After previous'). "+
"A custom panel is active: tests can only run in sequence (Start mode: 'After previous'). "+
"\nDo you want to keep the custom panel open and set all tests Start mode to 'After previous'?",
OptionType.YesNo);
if(ret == SwingUtils.OptionResult.Yes){
@@ -550,20 +550,8 @@ public class TestingList extends Panel {
saveProperties("customPanel", sPanelClassName);
jPanelCustom.setVisible(true);
animateCustomPanel();
} catch (ClassNotFoundException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (NoSuchMethodException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (SecurityException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalArgumentException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (InvocationTargetException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (Exception ex) {
System.out.println("animateCustomPanel(): "+String.valueOf(ex));
}
}
@@ -584,18 +572,8 @@ public class TestingList extends Panel {
cArg[0] = String.class;
Method animate = customPanel.getClass().getMethod("animate", cArg);
animate.invoke(customPanel, deviceName);
} catch (NoSuchMethodException ex) {
System.out.println("animateCustomPanel(): "+String.valueOf(ex));
} catch (SecurityException ex) {
System.out.println("animateCustomPanel(): "+String.valueOf(ex));
} catch (IllegalAccessException ex) {
System.out.println("animateCustomPanel(): "+String.valueOf(ex));
} catch (IllegalArgumentException ex) {
System.out.println("animateCustomPanel(): "+String.valueOf(ex));
} catch (InvocationTargetException ex) {
System.out.println("animateCustomPanel(): "+String.valueOf(ex));
} catch (Exception ex){
System.out.println("animateCustomPanel(): "+String.valueOf(ex));
} catch (Exception ex) {
System.out.println("animateCustomPanel(): "+String.valueOf(ex));
}
}
@@ -639,8 +617,8 @@ public class TestingList extends Panel {
private void log(Object text) {
try {
getController().getDataManager().appendLog(String.valueOf(text));
} catch (IOException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (Exception ex) {
System.out.println("animateCustomPanel(): "+String.valueOf(ex));
}
}
@@ -1494,20 +1472,8 @@ public class TestingList extends Panel {
dlg.getContentPane().add(detailsPanel);
dlg.pack();
dlg.setVisible(true);
} catch (ClassNotFoundException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (NoSuchMethodException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (SecurityException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalArgumentException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (InvocationTargetException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (Exception ex) {
System.out.println("animateCustomPanel(): "+String.valueOf(ex));
}
}
@@ -1812,7 +1778,7 @@ public class TestingList extends Panel {
try {
Object ret = eval("log('Tests interrupted by user')");
} catch (Exception ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
System.out.println("animateCustomPanel(): "+String.valueOf(ex));
}
}
@@ -2604,6 +2570,4 @@ public class TestingList extends Panel {
SwingUtils.showMessage(this, "loadListFilter()", ex.toString());
}
}
}