From b81cfff0a0c0a8ce6b1618ac9db65e553369eaef Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 21 Aug 2024 14:29:43 +0100 Subject: [PATCH] JAL-4442 reprioritise JvOptionPane debug output to either trace, debug or warn --- src/jalview/gui/JvOptionPane.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/jalview/gui/JvOptionPane.java b/src/jalview/gui/JvOptionPane.java index 726e942..7f4f132 100644 --- a/src/jalview/gui/JvOptionPane.java +++ b/src/jalview/gui/JvOptionPane.java @@ -879,7 +879,7 @@ public class JvOptionPane extends JOptionPane Thread.sleep(timeout); } catch (InterruptedException e) { - Console.debug( + Console.trace( "Dialog timeout interrupted. Probably a button pressed."); } jb.doClick(); @@ -900,7 +900,7 @@ public class JvOptionPane extends JOptionPane for (int i = 0; i < options.length; i++) { Object o = options[i]; - jalview.bin.Console.debug( + jalview.bin.Console.trace( "Setting button " + i + " to '" + o.toString() + "'"); JButton jb = buttons[i]; @@ -920,7 +920,7 @@ public class JvOptionPane extends JOptionPane Object obj = e.getSource(); if (obj == null || !(obj instanceof Component)) { - jalview.bin.Console.debug( + jalview.bin.Console.warn( "Could not find Component source of event object " + obj); return; @@ -930,7 +930,7 @@ public class JvOptionPane extends JOptionPane if (joptionpaneObject == null || !(joptionpaneObject instanceof JOptionPane)) { - jalview.bin.Console.debug( + jalview.bin.Console.warn( "Could not find JOptionPane ancestor of event object " + obj); return; @@ -1464,7 +1464,7 @@ public class JvOptionPane extends JOptionPane && options.length < 3)) { jalview.bin.Console - .debug("JvOptionPane: not enough options for dialog type"); + .warn("JvOptionPane: not enough options for dialog type"); } optionsButtons = new JButton[options.length]; for (int i = 0; i < options.length && i < 3; i++) @@ -1701,7 +1701,7 @@ public class JvOptionPane extends JOptionPane { buttons[i] = new JButton(); buttons[i].setText(buttonsText[i]); - Console.debug("DISABLING BUTTON " + buttons[i].getText()); + Console.trace("DISABLING BUTTON " + buttons[i].getText()); buttons[i].setEnabled(false); buttons[i].setVisible(false); } @@ -1770,7 +1770,7 @@ public class JvOptionPane extends JOptionPane return executor.awaitTermination(timeout, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { - Console.debug("Action was interrupted", e); + Console.trace("Action was interrupted", e); } } return true; -- 1.7.10.2