From 33c0b29ef7ddcfb6e9c6f57c3b4c647aa056ab50 Mon Sep 17 00:00:00 2001 From: dzmipt Date: Thu, 21 Dec 2023 16:36:03 +0100 Subject: [PATCH] remove extra logs added for debugging --- src/studio/ui/QGrid.java | 5 ----- src/studio/ui/WidthAdjuster.java | 2 -- test-integration/studio/ui/ResultTest.java | 20 -------------------- 3 files changed, 27 deletions(-) diff --git a/src/studio/ui/QGrid.java b/src/studio/ui/QGrid.java index 4150e8d5..06910dcb 100755 --- a/src/studio/ui/QGrid.java +++ b/src/studio/ui/QGrid.java @@ -189,7 +189,6 @@ public void stateChanged(ChangeEvent ev) { private long lastTimestamp = -1; public void mousePressed(MouseEvent e) { - log.info("mousePressed: popupTrigger: {}", e.isPopupTrigger()); if (maybeShowPopup(e)) return; int row = table.rowAtPoint(e.getPoint()); @@ -207,7 +206,6 @@ else if (row == lastRow && col == lastCol && } public void mouseReleased(MouseEvent e) { - log.info("mouseReleased: popupTrigger: {}", e.isPopupTrigger()); maybeShowPopup(e); } @@ -318,12 +316,9 @@ private JPopupMenu getPopupMenu(Point point) { int col = table.columnAtPoint(point); if (row == -1 || col == -1) return popupMenu; - log.info("getPopupMenu: row={}; col={}", row, col); row = table.convertRowIndexToModel(row); col = table.convertColumnIndexToModel(col); - log.info("getPopupMenu - after conversion: row={}; col={}", row, col); - String[] connections = Config.getInstance().getTableConnExtractor().getConnections(table.getModel(), row, col); if (connections.length == 0) return popupMenu; diff --git a/src/studio/ui/WidthAdjuster.java b/src/studio/ui/WidthAdjuster.java index 0478c988..8016c960 100755 --- a/src/studio/ui/WidthAdjuster.java +++ b/src/studio/ui/WidthAdjuster.java @@ -73,9 +73,7 @@ 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 19f55ab2..5358dd5f 100644 --- a/test-integration/studio/ui/ResultTest.java +++ b/test-integration/studio/ui/ResultTest.java @@ -2,10 +2,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.assertj.swing.core.KeyPressInfo; import org.assertj.swing.data.TableCell; import org.assertj.swing.fixture.*; -import org.assertj.swing.hierarchy.SingleComponentHierarchy; import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; @@ -14,12 +12,8 @@ import studio.kdb.MockQSession; import java.awt.*; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; import java.util.Arrays; -import static java.awt.event.KeyEvent.VK_ESCAPE; - public class ResultTest extends StudioTest { private static final Logger log = LogManager.getLogger(); @@ -90,13 +84,6 @@ public void testMarkersAfterSorting() { Assert.assertEquals(bgAfter, table.backgroundAt(TableCell.row(5).column(0)).target()); } - private void logHierarchy(String str) { - ByteArrayOutputStream outStream = new ByteArrayOutputStream(); - PrintStream out = new PrintStream(outStream); - robot().printer().printComponents(out); - log.info("Hierarchy [{}]:%n{}", str, outStream); - } - @Test public void testTableConnExtractor() { MockQSession.setResponse( @@ -108,15 +95,8 @@ public void testTableConnExtractor() { execute(); JTableFixture table = frameFixture.panel("resultPanel0").table(); - logHierarchy("Before first popup menu"); -// JPopupMenuFixture popupMenu = table.showPopupMenuAt(TableCell.row(1).column(0)); - logHierarchy("After first popup menu"); -// String[] labels = popupMenu.menuLabels(); -// Assert.assertEquals("Open z:2", labels[0]); - table.tableHeader().clickColumn(0).click(); JPopupMenuFixture popupMenu = table.showPopupMenuAt(TableCell.row(1).column(0)); - logHierarchy("After second popup menu"); String[] labels = popupMenu.menuLabels(); log.info("Got the following menu items {}", Arrays.toString(labels)); Assert.assertEquals("Open b:3", labels[0]);