Skip to content

Ghidra is a software reverse engineering (SRE) framework

removed accidentally added update

dragonmacherc39797e84126
diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/platform/DebuggerSelectPlatformOfferDialog.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/platform/DebuggerSelectPlatformOfferDialog.java
index e5b2812ae6..129c5d3528 100644
--- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/platform/DebuggerSelectPlatformOfferDialog.java
+++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/platform/DebuggerSelectPlatformOfferDialog.java
@@ -17,7 +17,8 @@ package ghidra.app.plugin.core.debug.gui.platform;
import java.awt.BorderLayout;
import java.awt.Dimension;
-import java.util.*;
+import java.util.Collection;
+import java.util.List;
import java.util.function.Function;
import javax.swing.*;
@@ -52,7 +53,9 @@ public class DebuggerSelectPlatformOfferDialog extends DialogComponentProvider {
return "Unspecified";
}
try {
- return LANG_SERV.getLanguageDescription(offer.getLanguageID()).getProcessor().toString();
+ return LANG_SERV.getLanguageDescription(offer.getLanguageID())
+ .getProcessor()
+ .toString();
}
catch (LanguageNotFoundException e) {
return "Not Found";
@@ -265,7 +268,7 @@ public class DebuggerSelectPlatformOfferDialog extends DialogComponentProvider {
private boolean isCancelled = false;
protected DebuggerSelectPlatformOfferDialog() {
- super(DebuggerResources.NAME_CHOOSE_PLATFORM, Set.of(Opt.MODAL, Opt.INCLUDE_BUTTONS));
+ super(DebuggerResources.NAME_CHOOSE_PLATFORM, true, false, true, false);
populateComponents();
}
@@ -287,10 +290,10 @@ public class DebuggerSelectPlatformOfferDialog extends DialogComponentProvider {
/**
* Set the preferred language and compiler spec IDs, typically from the current program.
- *
+ *
* <p>
* This must be called before {@link #setOffers(Collection)}.
- *
+ *
* @param langID the preferred language
* @param csID the preferred compiler spec (ABI)
*/
diff --git a/Ghidra/Framework/Docking/src/main/java/docking/DialogComponentProvider.java b/Ghidra/Framework/Docking/src/main/java/docking/DialogComponentProvider.java
index 0f262fff87..b1fa3bd90d 100644
--- a/Ghidra/Framework/Docking/src/main/java/docking/DialogComponentProvider.java
+++ b/Ghidra/Framework/Docking/src/main/java/docking/DialogComponentProvider.java
@@ -45,10 +45,6 @@ import utility.function.Callback;
public class DialogComponentProvider
implements ActionContextProvider, StatusListener, TaskListener {
- protected enum Opt {
- MODAL, INCLUDE_STATUS, INCLUDE_BUTTONS, CAN_RUN_TASKS;
- }
-
private static final Color WARNING_COLOR = new Color(0xff9900);
private final static int DEFAULT_DELAY = 750;
@@ -104,18 +100,7 @@ public class DialogComponentProvider
private Dimension defaultSize;
/**
- * Constructor for GhidraDialogComponent using option set instead of booleans
- * @param title the dialog title
- * @param options the options. See {@link Option} and
- * {{@link #DialogComponentProvider(String, boolean, boolean, boolean, boolean)}
- */
- protected DialogComponentProvider(String title, Set<Opt> options) {
- this(title, options.contains(Opt.MODAL), options.contains(Opt.INCLUDE_STATUS),
- options.contains(Opt.INCLUDE_BUTTONS), options.contains(Opt.CAN_RUN_TASKS));
- }
-
- /**
- * Constructor for a GhidraDialogComponent that will be modal and will include a status line and
+ * Constructor for a DialogComponentProvider that will be modal and will include a status line and
* a button panel. Its title will be the same as its name.
* @param title the dialog title.
*/
@@ -124,7 +109,7 @@ public class DialogComponentProvider
}
/**
- * Constructor for a GhidraDialogComponent that will include a status line and a button panel.
+ * Constructor for a DialogComponentProvider that will include a status line and a button panel.
* @param title the title for this dialog.
* @param modal true if this dialog should be modal.
*/
@@ -133,7 +118,7 @@ public class DialogComponentProvider
}
/**
- * Constructs a new GhidraDialogComponent.
+ * Constructs a new DialogComponentProvider.
* @param title the title for this dialog.
* @param modal true if this dialog should be modal.
* @param includeStatus true if this dialog should include a status line.
@@ -382,7 +367,7 @@ public class DialogComponentProvider
* </ul>
* To change this behavior, call {@link #setDefaultButton(JButton)} with the desired
* default button.
- *
+ *
* @param button the button
*/
protected void addButton(JButton button) {
@@ -622,7 +607,7 @@ public class DialogComponentProvider
/**
* Sets the text in the dialog's status line using the default color
- *
+ *
* @param text the text to display in the status line
*/
@Override
@@ -651,8 +636,8 @@ public class DialogComponentProvider
private void doSetStatusText(String text, MessageType type, boolean alert) {
- SystemUtilities.assertThisIsTheSwingThread(
- "Setting text must be performed on the Swing thread");
+ SystemUtilities
+ .assertThisIsTheSwingThread("Setting text must be performed on the Swing thread");
statusLabel.setText(text);
statusLabel.setForeground(getStatusColor(type));
@@ -686,8 +671,8 @@ public class DialogComponentProvider
private void doAlertMessage(Callback alertFinishedCallback) {
// must be on Swing; this allows us to synchronize the 'alerting' flag
- SystemUtilities.assertThisIsTheSwingThread(
- "Alerting must be performed on the Swing thread");
+ SystemUtilities
+ .assertThisIsTheSwingThread("Alerting must be performed on the Swing thread");
if (isAlerting) {
return;
@@ -828,7 +813,7 @@ public class DialogComponentProvider
/**
* Returns the current status in the dialogs status line
- *
+ *
* @return the status text
*/
public String getStatusText() {
@@ -1306,7 +1291,7 @@ public class DialogComponentProvider
* size) no matter which window this dialog is launched from. The default is not to use
* shared location and size, which means that there is a remembered location and size for this
* dialog for each window that has launched it (i.e. the window is the parent of the dialog).
- *
+ *
* @param useSharedLocation true to share locations
*/
public void setUseSharedLocation(boolean useSharedLocation) {
@@ -1317,7 +1302,7 @@ public class DialogComponentProvider
* Returns true if this dialog is intended to be shown and hidden relatively quickly. This
* is used to determine if this dialog should be allowed to parent other components. The
* default is false.
- *
+ *
* @return true if this dialog is transient
*/
public boolean isTransient() {
@@ -1326,7 +1311,7 @@ public class DialogComponentProvider
/**
* Sets this dialog to be transient (see {@link #isTransient()}
- *
+ *
* @param isTransient true for transient; false is the default
*/
public void setTransient(boolean isTransient) {