|
1 | 1 | package net.sourceforge.squirrel_sql.plugins.cache; |
2 | 2 |
|
| 3 | +import java.awt.GridLayout; |
| 4 | +import java.awt.Rectangle; |
| 5 | +import java.awt.event.ActionEvent; |
| 6 | +import java.sql.Connection; |
| 7 | +import java.util.concurrent.ExecutorService; |
| 8 | +import java.util.concurrent.Executors; |
| 9 | +import javax.swing.ImageIcon; |
| 10 | +import javax.swing.JScrollPane; |
| 11 | +import javax.swing.SwingUtilities; |
| 12 | + |
3 | 13 | import net.sourceforge.squirrel_sql.client.Main; |
4 | 14 | import net.sourceforge.squirrel_sql.client.action.SquirrelAction; |
5 | 15 | import net.sourceforge.squirrel_sql.client.session.ISQLPanelAPI; |
6 | 16 | import net.sourceforge.squirrel_sql.client.session.action.ISQLPanelAction; |
7 | 17 | import net.sourceforge.squirrel_sql.client.session.mainpanel.custompanel.CustomResultPanel; |
8 | 18 | import net.sourceforge.squirrel_sql.fw.datasetviewer.textdataset.DataSetTextArea; |
| 19 | +import net.sourceforge.squirrel_sql.fw.gui.textfind.TextFindCtrl; |
9 | 20 | import net.sourceforge.squirrel_sql.fw.sql.querytokenizer.IQueryTokenizer; |
10 | 21 | import net.sourceforge.squirrel_sql.fw.util.StringManager; |
11 | 22 | import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory; |
|
14 | 25 | import net.sourceforge.squirrel_sql.fw.util.log.ILogger; |
15 | 26 | import net.sourceforge.squirrel_sql.fw.util.log.LoggerController; |
16 | 27 |
|
17 | | -import javax.swing.ImageIcon; |
18 | | -import javax.swing.JScrollPane; |
19 | | -import javax.swing.SwingUtilities; |
20 | | -import java.awt.GridLayout; |
21 | | -import java.awt.Rectangle; |
22 | | -import java.awt.event.ActionEvent; |
23 | | -import java.sql.Connection; |
24 | | -import java.util.concurrent.ExecutorService; |
25 | | -import java.util.concurrent.Executors; |
26 | | - |
27 | 28 |
|
28 | 29 | public class StatisticsAndQueryPlanAction extends SquirrelAction implements ISQLPanelAction |
29 | 30 | { |
@@ -73,7 +74,9 @@ public void actionPerformed(ActionEvent e) |
73 | 74 | DataSetTextArea dataSetTextArea = new DataSetTextArea(s_stringMgr.getString("StatisticsAndQueryPlanAction.reading.stats.for.sql", cleanedSQL)); |
74 | 75 |
|
75 | 76 | JScrollPane scrollPane = new JScrollPane(dataSetTextArea); |
76 | | - resultPanel.add(scrollPane); |
| 77 | + TextFindCtrl textFindCtrl = new TextFindCtrl(dataSetTextArea, scrollPane, true); |
| 78 | + resultPanel.add(textFindCtrl.getContainerPanel()); |
| 79 | + |
77 | 80 | SwingUtilities.invokeLater(() -> dataSetTextArea.scrollRectToVisible(new Rectangle(0, 0))); |
78 | 81 |
|
79 | 82 | Connection con = _sqlPanelAPI.getSession().getSQLConnection().getConnection(); |
|
0 commit comments