Merge remote-tracking branch 'origin/Ghidra_10.1'

This commit is contained in:
Ryan Kurtz 2021-12-10 11:33:32 -05:00
commit 567e7cc21d
59 changed files with 3191 additions and 678 deletions

View file

@ -43,12 +43,12 @@ public class InputDialog extends DialogComponentProvider {
private InputDialogListener listener;
/**
* Creates a provider for a generic input dialog with the specified title, a text field,
* labeled by the specified label. The user should check the value of
* "isCanceled()" to know whether or not the user canceled the operation.
* Otherwise, use the "getValue()" or "getValues()" to get the value(s)
* entered by the user. Use the tool's "showDialog()" to display the dialog.
* Creates a provider for a generic input dialog with the specified title, a text field, labeled
* by the specified label. The user should check the value of "isCanceled()" to know whether or
* not the user canceled the operation. Otherwise, use the "getValue()" or "getValues()" to get
* the value(s) entered by the user. Use the tool's "showDialog()" to display the dialog.
* <P>
*
* @param dialogTitle used as the name of the dialog's title bar
* @param label value to use for the label of the text field
*/
@ -57,12 +57,12 @@ public class InputDialog extends DialogComponentProvider {
}
/**
* Creates a generic input dialog with the specified title, a text field,
* labeled by the specified label. The user should check the value of
* "isCanceled()" to know whether or not the user canceled the operation.
* Otherwise, use the "getValue()" or "getValues()" to get the value(s)
* entered by the user. Use the tool's "showDialog()" to display the dialog.
* Creates a generic input dialog with the specified title, a text field, labeled by the
* specified label. The user should check the value of "isCanceled()" to know whether or not the
* user canceled the operation. Otherwise, use the "getValue()" or "getValues()" to get the
* value(s) entered by the user. Use the tool's "showDialog()" to display the dialog.
* <P>
*
* @param dialogTitle used as the name of the dialog's title bar
* @param label value to use for the label of the text field
* @param initialValue initial value to use for the text field
@ -72,12 +72,12 @@ public class InputDialog extends DialogComponentProvider {
}
/**
* Creates a generic input dialog with the specified title, a text field,
* labeled by the specified label. The user should check the value of
* "isCanceled()" to know whether or not the user canceled the operation.
* Otherwise, use the "getValue()" or "getValues()" to get the value(s)
* entered by the user. Use the tool's "showDialog()" to display the dialog.
* Creates a generic input dialog with the specified title, a text field, labeled by the
* specified label. The user should check the value of "isCanceled()" to know whether or not the
* user canceled the operation. Otherwise, use the "getValue()" or "getValues()" to get the
* value(s) entered by the user. Use the tool's "showDialog()" to display the dialog.
* <P>
*
* @param dialogTitle used as the name of the dialog's title bar
* @param label value to use for the label of the text field
* @param initialValue initial value to use for the text field
@ -89,12 +89,12 @@ public class InputDialog extends DialogComponentProvider {
}
/**
* Creates a generic input dialog with the specified title, a text field,
* labeled by the specified label. The user should check the value of
* "isCanceled()" to know whether or not the user canceled the operation.
* Otherwise, use the "getValue()" or "getValues()" to get the value(s)
* entered by the user. Use the tool's "showDialog()" to display the dialog.
* Creates a generic input dialog with the specified title, a text field, labeled by the
* specified label. The user should check the value of "isCanceled()" to know whether or not the
* user canceled the operation. Otherwise, use the "getValue()" or "getValues()" to get the
* value(s) entered by the user. Use the tool's "showDialog()" to display the dialog.
* <P>
*
* @param dialogTitle used as the name of the dialog's title bar
* @param label value to use for the label of the text field
* @param initialValue initial value to use for the text field
@ -105,12 +105,12 @@ public class InputDialog extends DialogComponentProvider {
}
/**
* Creates a generic input dialog with the specified title, a text field,
* labeled by the specified label. The user should check the value of
* "isCanceled()" to know whether or not the user canceled the operation.
* Otherwise, use the "getValue()" or "getValues()" to get the value(s)
* entered by the user. Use the tool's "showDialog()" to display the dialog.
* Creates a generic input dialog with the specified title, a text field, labeled by the
* specified label. The user should check the value of "isCanceled()" to know whether or not the
* user canceled the operation. Otherwise, use the "getValue()" or "getValues()" to get the
* value(s) entered by the user. Use the tool's "showDialog()" to display the dialog.
* <P>
*
* @param dialogTitle used as the name of the dialog's title bar
* @param labels values to use for the labels of the text fields
* @param initialValues initial values to use for the text fields
@ -120,12 +120,12 @@ public class InputDialog extends DialogComponentProvider {
}
/**
* Creates a generic input dialog with the specified title, a text field,
* labeled by the specified label. The user should check the value of
* "isCanceled()" to know whether or not the user canceled the operation.
* Otherwise, use the "getValue()" or "getValues()" to get the value(s)
* entered by the user. Use the tool's "showDialog()" to display the dialog.
* Creates a generic input dialog with the specified title, a text field, labeled by the
* specified label. The user should check the value of "isCanceled()" to know whether or not the
* user canceled the operation. Otherwise, use the "getValue()" or "getValues()" to get the
* value(s) entered by the user. Use the tool's "showDialog()" to display the dialog.
* <P>
*
* @param dialogTitle used as the name of the dialog's title bar
* @param labels values to use for the labels of the text fields
* @param initialValues initial values to use for the text fields
@ -194,6 +194,7 @@ public class InputDialog extends DialogComponentProvider {
textFields = new MyTextField[inputLabels.length];
for (int i = 0; i < inputValues.length; i++) {
textFields[i] = new MyTextField(initialValues[i]);
inputValues[i] = initialValues[i];
textFields[i].addKeyListener(keyListener);
textFields[i].setName("input.dialog.text.field." + i);
panel.add(new GLabel(inputLabels[i], SwingConstants.RIGHT));
@ -221,11 +222,16 @@ public class InputDialog extends DialogComponentProvider {
@Override
protected void cancelCallback() {
isCanceled = true;
for (int v = 0; v < inputValues.length; v++) {
inputValues[v] = null;
}
close();
}
/**
* Returns if this dialog is cancelled
*
* @return true if cancelled
*/
public boolean isCanceled() {
@ -234,6 +240,7 @@ public class InputDialog extends DialogComponentProvider {
/**
* Return the value of the first (and maybe only) text field
*
* @return the text field value
*/
public String getValue() {
@ -242,6 +249,7 @@ public class InputDialog extends DialogComponentProvider {
/**
* Sets the text of the primary text field
*
* @param text the text
*/
public void setValue(String text) {
@ -250,15 +258,18 @@ public class InputDialog extends DialogComponentProvider {
/**
* Sets the text of the text field at the given index
*
* @param text the text
* @param index the index of the text field
*/
public void setValue(String text, int index) {
textFields[index].setText(text);
inputValues[index] = text;
}
/**
* Return the values for all the text field(s)
*
* @return the text field values
*/
public String[] getValues() {
@ -285,7 +296,8 @@ public class InputDialog extends DialogComponentProvider {
}
/**
* @see javax.swing.text.Document#insertString(int, java.lang.String, javax.swing.text.AttributeSet)
* @see javax.swing.text.Document#insertString(int, java.lang.String,
* javax.swing.text.AttributeSet)
*/
@Override
public void insertString(int offs, String str, AttributeSet a)

View file

@ -1,8 +1,8 @@
MODULE FILE LICENSE: lib/cglib-nodep-2.2.jar Apache License 2.0
MODULE FILE LICENSE: lib/guava-19.0.jar Apache License 2.0
MODULE FILE LICENSE: lib/jdom-legacy-1.1.3.jar JDOM License
MODULE FILE LICENSE: lib/log4j-api-2.12.1.jar Apache License 2.0
MODULE FILE LICENSE: lib/log4j-core-2.12.1.jar Apache License 2.0
MODULE FILE LICENSE: lib/log4j-api-2.15.0.jar Apache License 2.0
MODULE FILE LICENSE: lib/log4j-core-2.15.0.jar Apache License 2.0
MODULE FILE LICENSE: lib/commons-collections4-4.1.jar Apache License 2.0
MODULE FILE LICENSE: lib/commons-lang3-3.9.jar Apache License 2.0
MODULE FILE LICENSE: lib/commons-io-2.6.jar Apache License 2.0

View file

@ -29,8 +29,8 @@ dependencies {
api "cglib:cglib-nodep:2.2"
api "com.google.guava:guava:19.0"
api "org.jdom:jdom-legacy:1.1.3"
api "org.apache.logging.log4j:log4j-api:2.12.1"
api "org.apache.logging.log4j:log4j-core:2.12.1"
api "org.apache.logging.log4j:log4j-api:2.15.0"
api "org.apache.logging.log4j:log4j-core:2.15.0"
api "org.apache.commons:commons-collections4:4.1"
api "org.apache.commons:commons-lang3:3.9"
api "org.apache.commons:commons-text:1.6"

View file

@ -105,6 +105,7 @@ public class DataTypeArchiveTransformerPanel extends JPanel {
gbc.gridx = 3;
gbc.gridwidth = 1;
useOldFileIDCheckBox = new GCheckBox(" Use Old File ID");
useOldFileIDCheckBox.setSelected(true);
filePanel.add(useOldFileIDCheckBox, gbc);
}