diff --git a/src/studio/ui/WidthAdjuster.java b/src/studio/ui/WidthAdjuster.java index f8a1ddfc..0478c988 100755 --- a/src/studio/ui/WidthAdjuster.java +++ b/src/studio/ui/WidthAdjuster.java @@ -1,5 +1,7 @@ package studio.ui; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import studio.kdb.Config; import studio.kdb.KTableModel; @@ -24,6 +26,8 @@ public class WidthAdjuster extends MouseAdapter { private static final int EPSILON = 5; //boundary sensitivity private final boolean[] limitWidthState; + private static final Logger log = LogManager.getLogger(); + public WidthAdjuster(JTable table, JScrollPane scrollPane) { this.table = table; this.scrollPane = scrollPane; @@ -69,7 +73,9 @@ public void mouseClicked(final MouseEvent e) { int column = getModelColumn(e); if (column >= 0) { KTableModel ktm = (KTableModel) table.getModel(); + log.info("Table sorting start"); ktm.sort(column); + log.info("Table sorting finished"); scrollPane.repaint(); } } diff --git a/test-integration/studio/ui/ResultTest.java b/test-integration/studio/ui/ResultTest.java index e697cc66..b2779b4d 100644 --- a/test-integration/studio/ui/ResultTest.java +++ b/test-integration/studio/ui/ResultTest.java @@ -1,5 +1,7 @@ package studio.ui; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.assertj.swing.data.TableCell; import org.assertj.swing.fixture.*; import org.junit.Assert; @@ -10,9 +12,12 @@ import studio.kdb.MockQSession; import java.awt.*; +import java.util.Arrays; public class ResultTest extends StudioTest { + private static final Logger log = LogManager.getLogger(); + @BeforeClass public static void mock() { MockQSession.mock(); @@ -97,6 +102,7 @@ public void testTableConnExtractor() { table.tableHeader().clickColumn(0).click(); popupMenu = table.showPopupMenuAt(TableCell.row(1).column(0)); labels = popupMenu.menuLabels(); + log.info("Got the following menu items {}", Arrays.toString(labels)); Assert.assertEquals("Open b:3", labels[0]); }