Ghidra is a software reverse engineering (SRE) framework
GP-3008: Fixing search limit option message and help
Ryan Kurtzdc10c83e78b0
diff --git a/Ghidra/Features/Base/src/main/help/help/topics/Search/Query_Results_Dialog.htm b/Ghidra/Features/Base/src/main/help/help/topics/Search/Query_Results_Dialog.htmindex 6d2872436c..b7253dc0f9 100644--- a/Ghidra/Features/Base/src/main/help/help/topics/Search/Query_Results_Dialog.htm+++ b/Ghidra/Features/Base/src/main/help/help/topics/Search/Query_Results_Dialog.htm@@ -36,10 +36,9 @@see an entry for each in the Search Results window. The title bar shows the number of entriesbeing displayed.</P>- <P>The tool has an <A href=- "help/topics/Tool/ToolOptions_Dialog.htm#OptionsForTool">option</A> for the maximum number of- search results. The search will stop after this number has been exceeded. To see more search- results, <A href="help/topics/Tool/ToolOptions_Dialog.htm#SearchLimit">increase your search+ <P>The tool has an option for the maximum number of search results. The search will stop after+ this number has been exceeded. To see more search results,+ <A href="help/topics/Search/Search_Program_Text.htm#SearchLimit">increase your searchlimit</A>.</P></BLOCKQUOTE>diff --git a/Ghidra/Features/Base/src/main/help/help/topics/Search/Search_Program_Text.htm b/Ghidra/Features/Base/src/main/help/help/topics/Search/Search_Program_Text.htmindex f91253bf16..b2781cc519 100644--- a/Ghidra/Features/Base/src/main/help/help/topics/Search/Search_Program_Text.htm+++ b/Ghidra/Features/Base/src/main/help/help/topics/Search/Search_Program_Text.htm@@ -279,19 +279,20 @@"Query_Results_Dialog.htm">Query Results</A></I> display, your cursor in the Code Browser ismoved to that location where the match was found. So, if the match was found in an operand,then the location is moved to the matching string within the operand.</P>-- <P>The tool has an <A href=- "help/topics/Tool/ToolOptions_Dialog.htm#OptionsForTool">option</A> for the number of search- results. The search will stop after this number has been exceeded. A dialog as shown- below warns you of the partial results. To see more search results, <A href=- "help/topics/Tool/ToolOptions_Dialog.htm#SearchLimit">increase your search limit</A>.</P>+ </BLOCKQUOTE>++ <H3><A name="SearchLimit"></A>Search Limit Option</H3>++ <BLOCKQUOTE>+ <P>The tool has an option to limit the number of search results. The search will stop after+ this number has been exceeded. The below dialog warns you of the partial results. To see more+ search results, select <B>Edit</B><IMG src="help/shared/arrow.gif" border="0" ><B>Tool+ Options...</B> from the menu bar, then select the <I>Search</I> node in the tree. Edit the+ <I>Search Limit</I> field to increase your search limit.</P><P align="center"><IMG src="images/SearchLimitExceeded.png" border="0"></P>-</BLOCKQUOTE>--<BLOCKQUOTE><P> </P></BLOCKQUOTE>@@ -412,11 +413,6 @@<P class="relatedtopic"><A href="Query_Results_Dialog.htm">Query Results</A></P></LI>- <LI>- <P class="relatedtopic"><A href=- "help/topics/Tool/ToolOptions_Dialog.htm#SearchLimit">Search Limit tool option</A></P>- </LI>-<LI><P class="relatedtopic"><A href="help/topics/DataPlugin/Data.htm">Data</A></P></LI>diff --git a/Ghidra/Features/Base/src/main/help/help/topics/Search/images/SearchLimitExceeded.png b/Ghidra/Features/Base/src/main/help/help/topics/Search/images/SearchLimitExceeded.pngindex 9974b6c954..391bd7c030 100644Binary files a/Ghidra/Features/Base/src/main/help/help/topics/Search/images/SearchLimitExceeded.png and b/Ghidra/Features/Base/src/main/help/help/topics/Search/images/SearchLimitExceeded.png differdiff --git a/Ghidra/Features/Base/src/main/help/help/topics/Tool/ToolOptions_Dialog.htm b/Ghidra/Features/Base/src/main/help/help/topics/Tool/ToolOptions_Dialog.htmindex e65a69aed7..85621a9a6e 100644--- a/Ghidra/Features/Base/src/main/help/help/topics/Tool/ToolOptions_Dialog.htm+++ b/Ghidra/Features/Base/src/main/help/help/topics/Tool/ToolOptions_Dialog.htm@@ -283,13 +283,11 @@window. The <I>Tool</I> panel defines the options for the Tool. The table below lists thebasic options. Plugins may add their own options to the <I>Tool</I> options. If a tool doesnot have a plugin that uses an option, the option will not show up on the <I>Tool</I> panel.- For example, the Ghidra Project Window does not have plugins that use the Max Go to Entries,- Search Limit, or Subroutine Model so these options will not appear on the <I>Tool</I> panel.+ For example, the Ghidra Project Window does not have plugins that use the Max Go to Entries+ or Subroutine Model, so these options will not appear on the <I>Tool</I> panel.If an option has a description, it will show up in the description panel below the tree whenyou pass the mouse pointer over the component in the options panel.</P>- <P align="left"><A name="SearchLimit"></A></P>-<DIV align="center"><CENTER><TABLE border="1" width="80%">@@ -318,17 +316,6 @@Label</A> dialog</TD></TR>- <TR valign="middle">- <TD valign="top" width="200" align="left">Search Limit</TD>-- <TD valign="top" align="left">Numeric: The maximum number of search hits to allow;- for example, when you <A href="help/topics/Search/Search_Program_Text.htm">search- for text</A> in the Program, the search is stopped when the number of matches- exceeds this limit, or the max number of addresses displayed while doing a <A href=- "help/topics/Navigation/Navigation.htm#Go_To_Address_Label">Go To</A> for an entry- that has multiple matches.</TD>- </TR>-<TR valign="middle"><TD valign="top" width="200" align="left">Subroutine Model</TD>diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/searchmem/MemSearchPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/searchmem/MemSearchPlugin.javaindex a083af743c..dbca8c83a7 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/searchmem/MemSearchPlugin.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/searchmem/MemSearchPlugin.java@@ -593,7 +593,7 @@ public class MemSearchPlugin extends Plugin implements OptionsChangeListener,JComponent resultsTable = provider.getComponent();Msg.showInfo(getClass(), resultsTable, "Search Limit Exceeded!","Stopped search after finding " + matchCount + " matches.\n" +- "The Search limit can be changed in the Edit->Options, under Tool Options");+ "The search limit can be changed at Edit->Tool Options, under Search.");}// suggestion to not close search dialog. TODO remove next line in future versions.diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/searchtext/SearchTextPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/searchtext/SearchTextPlugin.javaindex 0981bab88b..f7676357e2 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/searchtext/SearchTextPlugin.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/searchtext/SearchTextPlugin.java@@ -562,7 +562,7 @@ public class SearchTextPlugin extends ProgramPlugin implements OptionsChangeListMsg.showWarn(getClass(), getParentComponent(), "Search Limit Exceeded!","Stopped search after finding " + matchCount + " matches.\n" +- "The Search limit can be changed in the Edit->Options, under Tool Options");+ "The search limit can be changed at Edit->Tool Options, under Search.");}// there was a suggestion that the dialog should not go way after a search all// searchDialog.close();diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/navigation/GoToQuery.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/navigation/GoToQuery.javaindex 133aaad0a8..dee311d524 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/navigation/GoToQuery.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/navigation/GoToQuery.java@@ -651,7 +651,7 @@ public class GoToQuery {SwingUtilities.invokeLater(() -> Msg.showWarn(getClass(), parent,"Search Limit Exceeded!","Stopped search after finding " + matchCount + " matches.\n" +- "The Search limit can be changed in the Edit->Options, under Tool Options"));+ "The search limit can be changed at Edit->Tool Options, under Search."));}}diff --git a/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/SearchScreenShots.java b/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/SearchScreenShots.javaindex 2935c686ee..15d76fced7 100644--- a/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/SearchScreenShots.java+++ b/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/SearchScreenShots.java@@ -25,6 +25,7 @@ import org.junit.Test;import docking.ComponentProvider;import docking.DialogComponentProvider;+import docking.widgets.combobox.GhidraComboBox;import docking.widgets.table.threaded.ThreadedTableModel;import ghidra.GhidraOptions;import ghidra.app.plugin.core.searchtext.SearchTextPlugin;@@ -105,8 +106,10 @@ public class SearchScreenShots extends AbstractSearchScreenShots {JRadioButton rbAll = (JRadioButton) getInstanceField("searchAllRB", dialog);rbAll.setSelected(true);- JTextField textField = (JTextField) getInstanceField("valueField", dialog);- setText(textField, "LAB");+ @SuppressWarnings("unchecked")+ GhidraComboBox<String> comboBox =+ (GhidraComboBox<String>) getInstanceField("valueComboBox", dialog);+ setComboBoxSelection(comboBox, "LAB");final JButton allButton = (JButton) getInstanceField("allButton", dialog);pressButton(allButton);@@ -167,8 +170,10 @@ public class SearchScreenShots extends AbstractSearchScreenShots {JRadioButton rbAll = (JRadioButton) getInstanceField("searchAllRB", dialog);rbAll.setSelected(true);- JTextField textField = (JTextField) getInstanceField("valueField", dialog);- setText(textField, "0");+ @SuppressWarnings("unchecked")+ GhidraComboBox<String> comboBox =+ (GhidraComboBox<String>) getInstanceField("valueComboBox", dialog);+ setComboBoxSelection(comboBox, "0");final JButton allButton = (JButton) getInstanceField("allButton", dialog);pressButton(allButton);