Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-7073 - Updates the processor manual launcher

dragonmacher4b1be46fc1f7
diff --git a/Ghidra/Features/Base/src/main/help/help/topics/CodeBrowserPlugin/ListingBackground.html b/Ghidra/Features/Base/src/main/help/help/topics/CodeBrowserPlugin/ListingBackground.html
index 879b8eb5eb..0305399658 100644
--- a/Ghidra/Features/Base/src/main/help/help/topics/CodeBrowserPlugin/ListingBackground.html
+++ b/Ghidra/Features/Base/src/main/help/help/topics/CodeBrowserPlugin/ListingBackground.html
@@ -62,7 +62,7 @@
<TR>
<TD style="background-color: #DEE3E7;">
<PRE>
- <CODE class="code">
+ <CODE style="color: #778899;">
public void run() throws Exception {
setBackgroundColor(anotherAddress, Color.YELLOW);
@@ -93,7 +93,7 @@
<TR>
<TD style="background-color: #DEE3E7;">
<PRE>
- <CODE class="code">
+ <CODE style="color: #778899;">
public void run() throws Exception {
ColorizingService service = state.getTool().getService(ColorizingService.class);
diff --git a/Ghidra/Features/Base/src/main/help/help/topics/ComputeChecksumsPlugin/Generate_Checksum_Help.html b/Ghidra/Features/Base/src/main/help/help/topics/ComputeChecksumsPlugin/Generate_Checksum_Help.html
index 48819b2220..efb712d62b 100644
--- a/Ghidra/Features/Base/src/main/help/help/topics/ComputeChecksumsPlugin/Generate_Checksum_Help.html
+++ b/Ghidra/Features/Base/src/main/help/help/topics/ComputeChecksumsPlugin/Generate_Checksum_Help.html
@@ -21,7 +21,7 @@
<BLOCKQUOTE>
<!-- Group checksums together using color and indentation -->
- <DIV STYLE="background-color: #eeeeee;">
+ <DIV STYLE="background-color: #eeeeee; color: black;">
<BLOCKQUOTE>
<H3>Checksum-8</H3>
@@ -68,7 +68,7 @@
<!-- Group checksums together using color and indentation -->
- <DIV STYLE="background-color: #eeeeee;">
+ <DIV STYLE="background-color: #eeeeee; color: black;">
<H3>Adler-32</H3>
@@ -125,7 +125,7 @@
<BLOCKQUOTE>
<!-- Group checksums together using color and indentation -->
- <DIV STYLE="background-color: #eeeeee;">
+ <DIV STYLE="background-color: #eeeeee; color: black;">
<H3><B>MD2</B></H3>
diff --git a/Ghidra/Features/Base/src/main/help/help/topics/ShowInstructionInfoPlugin/ShowInstructionInfo.htm b/Ghidra/Features/Base/src/main/help/help/topics/ShowInstructionInfoPlugin/ShowInstructionInfo.htm
index 715c12a5c4..c9e0fbdb7c 100644
--- a/Ghidra/Features/Base/src/main/help/help/topics/ShowInstructionInfoPlugin/ShowInstructionInfo.htm
+++ b/Ghidra/Features/Base/src/main/help/help/topics/ShowInstructionInfoPlugin/ShowInstructionInfo.htm
@@ -69,10 +69,14 @@
<P align="center"><A name="Processor_Manual_Options"></A> <IMG src=
"images/ProcessorManualOptions.png" border="0"></P>
+
+ <BR>
+ <BR>
+
<TABLE border="1">
<TBODY>
<TR>
- <TH width="20%">Options Name</TH>
+ <TH width="25%">Options Name</TH>
<TH>Description</TH>
</TR>
@@ -89,20 +93,190 @@
<TR>
<TD valign="top">Command Arguments</TD>
- <TD>A space separated list of arguments that Ghidra will pass to the process listed
+ <TD>
+
+ A space separated list of arguments that Ghidra will pass to the process listed
above. If you need to include spaces as part of one of the arguments, then enclose the
- argument in double quotes (e.g., "arg with space").</TD>
+ argument in double quotes (e.g., "arg with space").
+ <BR><BR>
+ The arguments will be passed to the process with the url as the last argument. The
+ exception to this is if you use the ${FILENAME} variable. In that case, the file path
+ will be passed where you placed it in the list of arguments.
+ <BR><BR>
+ Ghidra will process the following variables, if present:
+ <UL>
+ <LI>
+ ${FILENAME} - this will be replaced with the file path.
+ </LI>
+ <LI>
+ ${PAGE} - this will be replaced with the page number for the current
+ instruction.
+ </LI>
+ </UL>
+ </TD>
</TR>
<TR>
<TD valign="top">File Format</TD>
<TD>Ghidra will pass, by default, a URL to the given process. You may change this value
- to signal to Ghidra that it should pass a filename instead.</TD>
+ to signal to Ghidra that it should pass a filename instead.
+
+ <UL>
+ <LI>
+ ${HTTP_URL} - an http url suitable for a web browser. This will be a url
+ that points to temp page that itself points to a file and page number of the
+ instruction.
+ </LI>
+ <LI>
+ ${FILE_URL} - a file url that includes the page number of the instruction.
+ </LI>
+ <LI>
+ ${FILENAME} - the file path without the leading 'file:' protocol.
+ </LI>
+ </UL>
+
+ </TD>
</TR>
</TBODY>
- </TABLE><BR>
+ </TABLE>
+ <BR>
<BR>
+
+ <H3>Examples</H3>
+ <BLOCKQUOTE>
+ <TABLE border="1" width="90%">
+ <TBODY>
+ <TR>
+ <TH width="25%">Options Name</TH>
+ <TH>Value</TH>
+ </TR>
+
+ <TR>
+ <TD valign="top" align="right">Command String</TD>
+
+ <TD>
+ google-chrome
+ </TD>
+ </TR>
+
+ <TR>
+ <TD valign="top" align="right">Command Arguments</TD>
+
+ <TD>
+
+ </TD>
+ </TR>
+
+ <TR>
+ <TD valign="top" align="right">File Format</TD>
+
+ <TD>
+ ${FILE_URL}
+ </TD>
+ </TR>
+ <TR>
+ <TD valign="top" align="right"><I>Result</I></TD>
+
+ <TD>
+ <CODE>
+ google-chrome file:/usr/local/manuals/processor.pdf#page=717
+ </CODE>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+
+ <BR>
+ <BR>
+ <TABLE border="1" width="90%">
+ <TBODY>
+ <TR>
+ <TH width="25%">Options Name</TH>
+ <TH>Value</TH>
+ </TR>
+
+ <TR>
+ <TD valign="top" align="right">Command String</TD>
+
+ <TD>
+ cmd.exe
+ </TD>
+ </TR>
+
+ <TR>
+ <TD valign="top" align="right">Command Arguments</TD>
+ <TD>
+ /c start
+ </TD>
+ </TR>
+
+ <TR>
+ <TD valign="top" align="right">File Format</TD>
+
+ <TD>
+ ${HTTP_URL}
+ </TD>
+ </TR>
+ <TR>
+ <TD valign="top" align="right"><I>Result</I></TD>
+
+ <TD>
+ <CODE>
+ cmd.exe /c start file:/tmp/user-ghidra/pdfView5915851125268369591.html
+ </CODE>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+
+
+ <BR>
+ <BR>
+ <TABLE border="1" width="90%">
+ <TBODY>
+ <TR>
+ <TH width="25%">Options Name</TH>
+ <TH>Value</TH>
+ </TR>
+
+ <TR>
+ <TD valign="top" align="right">Command String</TD>
+
+ <TD>
+ C:\SumatraPDF.exe
+ </TD>
+ </TR>
+
+ <TR>
+ <TD valign="top" align="right">Command Arguments</TD>
+ <TD>
+ -resuse-instance -page ${PAGE}
+ </TD>
+ </TR>
+
+ <TR>
+ <TD valign="top" align="right">File Format</TD>
+
+ <TD>
+ ${FILENAME}
+ </TD>
+ </TR>
+ <TR>
+ <TD valign="top" align="right"><I>Result</I></TD>
+
+ <TD>
+ <CODE>
+ C:\SumatraPDF.exe -resuse-instance -page 67 processor.pdf
+ </CODE>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+
+ <BR>
+ <BR>
+ </BLOCKQUOTE>
</BLOCKQUOTE>
<H2><A name="Show_Instruction_Info_Window"></A><B>Instruction Info Window</B></H2>
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/BrowserLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/util/BrowserLoader.java
index 3c13ad2c2f..2cc57a462c 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/util/BrowserLoader.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/util/BrowserLoader.java
@@ -15,6 +15,8 @@
*/
package ghidra.util;
+import static ghidra.util.ManualViewerCommandWrappedOption.*;
+
import java.io.File;
import java.net.URL;
import java.net.URLDecoder;
@@ -98,7 +100,7 @@ public class BrowserLoader {
ManualViewerCommandWrappedOption.getDefaultBrowserLoaderOptions();
ManualViewerCommandWrappedOption customOption =
(ManualViewerCommandWrappedOption) options.getCustomOption(
- ManualViewerCommandWrappedOption.MANUAL_VIEWER_OPTIONS, defaultOption);
+ MANUAL_VIEWER_OPTIONS, defaultOption);
boolean success = tryToDisplayBrowser(url, fileURL, customOption);
while (!success) {
@@ -111,8 +113,8 @@ public class BrowserLoader {
}
// -if not cancelled, then show the options dialog
- service.showOptionsDialog(ManualViewerCommandWrappedOption.OPTIONS_CATEGORY_NAME,
- ManualViewerCommandWrappedOption.OPTIONS_CATEGORY_NAME);
+ service.showOptionsDialog(OPTIONS_CATEGORY_NAME,
+ OPTIONS_CATEGORY_NAME);
if (!listener.hasChanged()) {
return; // the user didn't change the options, so we can't do anything
}
@@ -149,11 +151,14 @@ public class BrowserLoader {
return true;
}
+ /*
+ See the help page for example output.
+ */
private static String[] generateCommandArguments(URL url, URL fileURL,
ManualViewerCommandWrappedOption option) {
- List<String> argumentList = new ArrayList<String>();
- argumentList.add(option.getCommandString());
+ List<String> resultArgs = new ArrayList<String>();
+ resultArgs.add(option.getCommandString());
// Substitute ${PAGE} (the manual page, carried as a "#page=N" fragment on the file URL)
// and ${FILENAME} (the local file path) tokens into the user-supplied arguments.
@@ -161,52 +166,67 @@ public class BrowserLoader {
String pageNumber = getManualPageNumber(fileURL);
String fileName = getManualFilePath(fileURL);
boolean fileNameInArgs = false;
- String[] commandArguments = option.getCommandArguments();
- for (String string : commandArguments) {
- if (string.contains(ManualViewerCommandWrappedOption.FILENAME_REPLACEMENT_STRING)) {
+ String[] rawArgs = option.getCommandArguments();
+ for (String string : rawArgs) {
+ if (string.contains(FILENAME_REPLACEMENT_STRING)) {
fileNameInArgs = true;
}
- string =
- string.replace(ManualViewerCommandWrappedOption.PAGE_REPLACEMENT_STRING, pageNumber);
+
+ string = string.replace(PAGE_REPLACEMENT_STRING, pageNumber);
if (fileName != null) {
- string = string.replace(
- ManualViewerCommandWrappedOption.FILENAME_REPLACEMENT_STRING, fileName);
+ string = string.replace(FILENAME_REPLACEMENT_STRING, fileName);
}
- argumentList.add(string);
+ resultArgs.add(string);
}
// The user already positioned the file via the ${FILENAME} token; don't append it again.
if (fileNameInArgs) {
- return argumentList.toArray(new String[argumentList.size()]);
+ return resultArgs.toArray(new String[resultArgs.size()]);
}
- String urlString = option.getUrlReplacementString();
+ String urlString = option.getFileFormat();
String urlArg;
- if (urlString.equals(ManualViewerCommandWrappedOption.HTTP_URL_REPLACEMENT_STRING) ||
- fileURL == null) {
+ if (urlString.equals(HTTP_URL_REPLACEMENT_STRING) || fileURL == null) {
urlArg = url.toExternalForm();
}
- else if (urlString.equals(ManualViewerCommandWrappedOption.FILE_URL_REPLACEMENT_STRING)) {
+ else if (urlString.equals(FILE_URL_REPLACEMENT_STRING)) {
urlArg = fileURL.toExternalForm();
}
else {
urlArg = fileName;
}
+ List<String> cmdExeArgs = fixupCmdExeCall(rawArgs, urlArg);
+ if (!cmdExeArgs.isEmpty()) {
+ resultArgs.addAll(cmdExeArgs);
+ }
+ else {
+ resultArgs.add(urlArg);
+ }
+
+ return resultArgs.toArray(new String[resultArgs.size()]);
+ }
+
+ private static List<String> fixupCmdExeCall(String[] rawArgs, String urlArg) {
// If launching "cmd.exe /c start URL", surround the URL with double quotes to protect
// against special characters being misinterpreted by the shell.
// NOTE: If not already present, a double-quoted title must be inserted since the URL
// argument that follows will start with a double quote.
- if (commandArguments.length >= 2 && commandArguments[0].equalsIgnoreCase("/c") &&
- commandArguments[1].equalsIgnoreCase("start")) {
- if (commandArguments.length == 2) {
- argumentList.add("\"Title\"");
- }
- urlArg = '"' + urlArg + '"';
+ List<String> result = new ArrayList<>();
+ if (rawArgs.length < 2) {
+ return result;
+ }
+
+ if (!(rawArgs[0].equalsIgnoreCase("/c") && rawArgs[1].equalsIgnoreCase("start"))) {
+ return result;
+ }
+
+ if (rawArgs.length == 2) {
+ result.add("\"Title\"");
}
- argumentList.add(urlArg);
- return argumentList.toArray(new String[argumentList.size()]);
+ result.add('"' + urlArg + '"');
+ return result;
}
/**
@@ -250,7 +270,8 @@ public class BrowserLoader {
private boolean hasChanged = false;
@Override
- public void optionsChanged(ToolOptions theOptions, String name, Object oldValue, Object newValue) {
+ public void optionsChanged(ToolOptions theOptions, String name, Object oldValue,
+ Object newValue) {
hasChanged = true;
}
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/ManualViewerCommandEditor.java b/Ghidra/Features/Base/src/main/java/ghidra/util/ManualViewerCommandEditor.java
index 3d99a6db73..c0c7918f49 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/util/ManualViewerCommandEditor.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/util/ManualViewerCommandEditor.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -15,6 +15,10 @@
*/
package ghidra.util;
+
+import static ghidra.util.HTMLUtilities.*;
+import static ghidra.util.ManualViewerCommandWrappedOption.*;
+
import java.awt.Component;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
@@ -35,23 +39,29 @@ import ghidra.util.layout.PairLayout;
public class ManualViewerCommandEditor extends PropertyEditorSupport
implements CustomOptionsEditor {
- private static final String FILE_FORMAT_DESCRIPTION =
- "This determines the format of the " + "URL that is sent to the process above. If " +
- ManualViewerCommandWrappedOption.HTTP_URL_REPLACEMENT_STRING +
- " is chosen, then an HTTP URL will be passed to the process. If " +
- ManualViewerCommandWrappedOption.FILE_URL_REPLACEMENT_STRING +
- " is chosen, the a File URL will be sent to " + "the process. If " +
- ManualViewerCommandWrappedOption.FILENAME_REPLACEMENT_STRING +
- " is chosen, then only the file path will be sent to the process.";
+ //@formatter:off
+ private static final String FILE_FORMAT_DESCRIPTION = """
+ This determines the format of the URL that is sent to the process above.
+ - %s: an HTTP URL will be passed to the process.
+ - %s: a File URL will be passed to the process.
+ - %s: only the file path will be passed to the process.
+ """.formatted(HTTP_URL_REPLACEMENT_STRING,
+ FILE_URL_REPLACEMENT_STRING,
+ FILENAME_REPLACEMENT_STRING);
+ //@formatter:on
+
private static final String COMMAND_STRING_DESCRIPTION = "This is the name of, or a full " +
- "path to an executable that will be launched to open the processor manual. " +
- "Examples include 'firefox', 'netscape', 'open', etc.";
- private static final String COMMAND_ARGUMENTS_DESCRIPTION =
- "Arguments passed to the command.\n" +
- ManualViewerCommandWrappedOption.PAGE_REPLACEMENT_STRING +
- ": replaced with the manual page number\n" +
- ManualViewerCommandWrappedOption.FILENAME_REPLACEMENT_STRING +
- ": replaced with manual filename; automatically appended if not specified";
+ "path to an executable that will be launched to open the processor manual.\n" +
+ "Examples: 'google-chrome', 'open', etc.";
+
+ //@formatter:off
+ private static final String COMMAND_ARGUMENTS_DESCRIPTION = """
+ Arguments passed to the command.
+ - %s: replaced with the manual page number.
+ - %s: replaced with manual filename; automatically appended if not specified.
+ """.formatted(PAGE_REPLACEMENT_STRING,
+ FILENAME_REPLACEMENT_STRING);
+ //@formatter:on
private static final String[] DESCRIPTIONS =
{ FILE_FORMAT_DESCRIPTION, COMMAND_STRING_DESCRIPTION, COMMAND_ARGUMENTS_DESCRIPTION };
@@ -74,15 +84,6 @@ public class ManualViewerCommandEditor extends PropertyEditorSupport
editorComponent = new LaunchDataInputPanel();
}
- /**
- * Wraps description text in fixed-width HTML so the tooltip wraps across multiple lines rather
- * than rendering as a single long line.
- * @param text the plain description text
- * @return the text wrapped in width-constrained HTML
- */
- private static String toHtmlTooltip(String text) {
- return "<html><div style=\"width: 384px;\">" + text.replace("\n", "<br>") + "</div></html>";
- }
@Override
public String[] getOptionDescriptions() {
@@ -132,7 +133,7 @@ public class ManualViewerCommandEditor extends PropertyEditorSupport
"Unable to parse command arguments: " + argumentsField.getText(), e);
return wrappedOption; // signal that the options haven't changed
}
- newOption.setUrlReplacementString((String) fileFormatComboBox.getSelectedItem());
+ newOption.setFileFormat((String) fileFormatComboBox.getSelectedItem());
return newOption;
}
@@ -190,7 +191,7 @@ public class ManualViewerCommandEditor extends PropertyEditorSupport
argumentsField.setText(buffer.toString().trim());
- fileFormatComboBox.setSelectedItem(option.getUrlReplacementString());
+ fileFormatComboBox.setSelectedItem(option.getFileFormat());
}
ManualViewerCommandWrappedOption getOption() {
@@ -207,7 +208,7 @@ public class ManualViewerCommandEditor extends PropertyEditorSupport
}
option.setCommandArguments(arguments);
- option.setUrlReplacementString((String) fileFormatComboBox.getSelectedItem());
+ option.setFileFormat((String) fileFormatComboBox.getSelectedItem());
return option;
}
@@ -218,23 +219,19 @@ public class ManualViewerCommandEditor extends PropertyEditorSupport
workPanel.setLayout(new PairLayout());
JLabel commandLabel = new GDLabel(COMMAND_STRING_LABEL);
+ commandLabel.setToolTipText(COMMAND_STRING_DESCRIPTION);
commandField = new JTextField(50);
JLabel argumentsLabel = new GDLabel(COMMAND_ARGUMENTS_LABEL);
- argumentsLabel.setToolTipText(toHtmlTooltip(COMMAND_ARGUMENTS_DESCRIPTION));
+ argumentsLabel.setToolTipText(toHTML(COMMAND_ARGUMENTS_DESCRIPTION));
argumentsField = new JTextField(50);
- argumentsField.setToolTipText(toHtmlTooltip(COMMAND_ARGUMENTS_DESCRIPTION));
JLabel formatLabel = new GDLabel(FILE_FORMAT_LABEL);
- formatLabel.setToolTipText(toHtmlTooltip(FILE_FORMAT_DESCRIPTION));
+ formatLabel.setToolTipText(toHTML(FILE_FORMAT_DESCRIPTION));
fileFormatComboBox = new GComboBox<>();
- fileFormatComboBox.setToolTipText(toHtmlTooltip(FILE_FORMAT_DESCRIPTION));
- fileFormatComboBox.addItem(
- ManualViewerCommandWrappedOption.HTTP_URL_REPLACEMENT_STRING);
- fileFormatComboBox.addItem(
- ManualViewerCommandWrappedOption.FILE_URL_REPLACEMENT_STRING);
- fileFormatComboBox.addItem(
- ManualViewerCommandWrappedOption.FILENAME_REPLACEMENT_STRING);
+ fileFormatComboBox.addItem(HTTP_URL_REPLACEMENT_STRING);
+ fileFormatComboBox.addItem(FILE_URL_REPLACEMENT_STRING);
+ fileFormatComboBox.addItem(FILENAME_REPLACEMENT_STRING);
fileFormatComboBox.setSelectedIndex(0);
// add each grouping of widgets as a single line in the main panel's vertical layout;
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/ManualViewerCommandWrappedOption.java b/Ghidra/Features/Base/src/main/java/ghidra/util/ManualViewerCommandWrappedOption.java
index 534286dfd1..7325362540 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/util/ManualViewerCommandWrappedOption.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/util/ManualViewerCommandWrappedOption.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -15,6 +15,8 @@
*/
package ghidra.util;
+import java.util.Objects;
+
import ghidra.framework.OperatingSystem;
import ghidra.framework.Platform;
import ghidra.framework.options.CustomOption;
@@ -30,7 +32,7 @@ public class ManualViewerCommandWrappedOption implements CustomOption {
/**
* Token that may be used within the command arguments; it is replaced with the manual page
- * number when the command is launched (e.g. SumatraPDF's {@code -page ${PAGE}}).
+ * number when the command is launched.
*/
static final String PAGE_REPLACEMENT_STRING = "${PAGE}";
@@ -38,12 +40,11 @@ public class ManualViewerCommandWrappedOption implements CustomOption {
private static final String COMMAND_ARGUMENTS = "commandArguments";
private static final String URL_STRING = "urlReplacementString";
- private static final String DEFAULT_URL_REPLACEMENT_STRING =
- ManualViewerCommandWrappedOption.HTTP_URL_REPLACEMENT_STRING;
+ private static final String DEFAULT_URL_REPLACEMENT_STRING = HTTP_URL_REPLACEMENT_STRING;
private String commandString;
private String[] commandArguments;
- private String urlReplacementString;
+ private String fileFormat;
public ManualViewerCommandWrappedOption() {
// required for persistence
@@ -53,14 +54,14 @@ public class ManualViewerCommandWrappedOption implements CustomOption {
public void readState(GProperties properties) {
commandString = properties.getString(COMMAND_STRING, null);
commandArguments = properties.getStrings(COMMAND_ARGUMENTS, null);
- urlReplacementString = properties.getString(URL_STRING, null);
+ fileFormat = properties.getString(URL_STRING, null);
}
@Override
public void writeState(GProperties properties) {
properties.putString(COMMAND_STRING, commandString);
properties.putStrings(COMMAND_ARGUMENTS, commandArguments);
- properties.putString(URL_STRING, urlReplacementString);
+ properties.putString(URL_STRING, fileFormat);
}
@Override
@@ -68,7 +69,7 @@ public class ManualViewerCommandWrappedOption implements CustomOption {
int hash = 0;
hash += commandString == null ? 0 : commandString.hashCode();
- hash += urlReplacementString == null ? 0 : urlReplacementString.hashCode();
+ hash += fileFormat == null ? 0 : fileFormat.hashCode();
if (commandArguments != null) {
for (String arg : commandArguments) {
@@ -90,9 +91,9 @@ public class ManualViewerCommandWrappedOption implements CustomOption {
}
ManualViewerCommandWrappedOption otherOption = (ManualViewerCommandWrappedOption) obj;
- return SystemUtilities.isEqual(commandString, otherOption.commandString) &&
- SystemUtilities.isEqual(urlReplacementString, otherOption.urlReplacementString) &&
- SystemUtilities.isArrayEqual(commandArguments, otherOption.commandArguments);
+ return Objects.equals(commandString, otherOption.commandString) &&
+ Objects.equals(fileFormat, otherOption.fileFormat) &&
+ Objects.deepEquals(commandArguments, otherOption.commandArguments);
}
public String getCommandString() {
@@ -111,12 +112,12 @@ public class ManualViewerCommandWrappedOption implements CustomOption {
this.commandArguments = commandArguments;
}
- public String getUrlReplacementString() {
- return urlReplacementString;
+ public String getFileFormat() {
+ return fileFormat;
}
- public void setUrlReplacementString(String urlReplacementString) {
- this.urlReplacementString = urlReplacementString;
+ public void setFileFormat(String newFormat) {
+ this.fileFormat = newFormat;
}
public static ManualViewerCommandWrappedOption getDefaultBrowserLoaderOptions() {
@@ -126,22 +127,22 @@ public class ManualViewerCommandWrappedOption implements CustomOption {
option.setCommandString(System.getenv("ComSpec"));
String[] args = new String[] { "/c", "start" };
option.setCommandArguments(args);
- option.setUrlReplacementString(DEFAULT_URL_REPLACEMENT_STRING);
+ option.setFileFormat(DEFAULT_URL_REPLACEMENT_STRING);
}
else if (Platform.CURRENT_PLATFORM.getOperatingSystem() == OperatingSystem.LINUX) {
- option.setCommandString("firefox");
+ option.setCommandString("google-chrome");
option.setCommandArguments(new String[] {});
- option.setUrlReplacementString(DEFAULT_URL_REPLACEMENT_STRING);
+ option.setFileFormat(DEFAULT_URL_REPLACEMENT_STRING);
}
else if (Platform.CURRENT_PLATFORM.getOperatingSystem() == OperatingSystem.MAC_OS_X) {
option.setCommandString("open");
option.setCommandArguments(new String[] {});
- option.setUrlReplacementString(DEFAULT_URL_REPLACEMENT_STRING);
+ option.setFileFormat(DEFAULT_URL_REPLACEMENT_STRING);
}
else {
option.setCommandString("");
option.setCommandArguments(new String[] {});
- option.setUrlReplacementString(DEFAULT_URL_REPLACEMENT_STRING);
+ option.setFileFormat(DEFAULT_URL_REPLACEMENT_STRING);
}
return option;
diff --git a/Ghidra/Framework/Docking/src/main/help/help/topics/Trees/GhidraTreeFilter.html b/Ghidra/Framework/Docking/src/main/help/help/topics/Trees/GhidraTreeFilter.html
index a0175dcc40..f17062a6e3 100644
--- a/Ghidra/Framework/Docking/src/main/help/help/topics/Trees/GhidraTreeFilter.html
+++ b/Ghidra/Framework/Docking/src/main/help/help/topics/Trees/GhidraTreeFilter.html
@@ -269,7 +269,7 @@
delimiter character from the following:<BR>
</P>
- <P style="border:1px; border-style:solid; border-color:#CCCCCC; background-color:#EEEEEE">
+ <P style="border:1px; border-style:solid; border-color:#CCCCCC; color: black; background-color:#EEEEEE">
[space] ~ ` ! @ # $ % ^ &amp; * - _ + = | : ; , .</P>
<P>Whitespace preceding and trailing the delimiter is automatically removed.</P>
diff --git a/Ghidra/Framework/Docking/src/main/java/docking/menu/DockingToolBarUtils.java b/Ghidra/Framework/Docking/src/main/java/docking/menu/DockingToolBarUtils.java
index 712f684ad0..4ff4a85990 100644
--- a/Ghidra/Framework/Docking/src/main/java/docking/menu/DockingToolBarUtils.java
+++ b/Ghidra/Framework/Docking/src/main/java/docking/menu/DockingToolBarUtils.java
@@ -53,12 +53,12 @@ public class DockingToolBarUtils {
String toolTipText = getToolTipText(action);
String keyBindingText = getKeyBindingAcceleratorText(button, action.getKeyBinding());
if (keyBindingText != null) {
- return combingToolTipTextWithKeyBinding(toolTipText, keyBindingText);
+ return combineToolTipTextWithKeyBinding(toolTipText, keyBindingText);
}
return toolTipText;
}
- private static String combingToolTipTextWithKeyBinding(String toolTipText,
+ private static String combineToolTipTextWithKeyBinding(String toolTipText,
String keyBindingText) {
StringBuilder buffy = new StringBuilder(toolTipText);
if (StringUtilities.startsWithIgnoreCase(toolTipText, "<html>")) {