Merge remote-tracking branch

'origin/GP-5806_ghidragon_add_namspace_chooser_to_rename_dialog--SQUASHED'
(Closes #8263)
This commit is contained in:
Ryan Kurtz
2025-10-07 05:45:42 -04:00
19 changed files with 887 additions and 159 deletions
@@ -68,18 +68,6 @@ public class DataTypeEditorsScreenShots extends GhidraScreenShotGenerator {
positionListingTop(0x40D3B8);
DropDownSelectionTextField<?> textField = showTypeChooserDialog();
triggerText(textField, "undefined");
DialogComponentProvider dialog = getDialog();
JComponent component = dialog.getComponent();
Window dataTypeDialog = windowForComponent(component);
Window[] popUpWindows = dataTypeDialog.getOwnedWindows();
List<Component> dataTypeWindows = new ArrayList<>(Arrays.asList(popUpWindows));
dataTypeWindows.add(dataTypeDialog);
captureComponents(dataTypeWindows);
closeAllWindows();
}
private DropDownSelectionTextField<?> showTypeChooserDialog() throws Exception {
@@ -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.
@@ -23,8 +23,7 @@ import org.junit.Test;
import docking.widgets.combobox.GhidraComboBox;
import ghidra.app.plugin.core.label.*;
import ghidra.app.util.AddEditDialog;
import ghidra.app.util.EditFieldNameDialog;
import ghidra.app.util.*;
import ghidra.program.model.address.*;
import ghidra.program.model.symbol.LabelHistory;
@@ -76,11 +75,21 @@ public class LabelMgrPluginScreenShots extends GhidraScreenShotGenerator {
captureDialog();
}
@Test
public void testChooseNamespace() {
runSwingLater(() -> {
NamespaceChooserDialog dialog = new NamespaceChooserDialog();
dialog.getNameSpace(program);
});
waitForDialogComponent(NamespaceChooserDialog.class);
captureDialog();
}
@Test
public void testSetLabel() {
LabelMgrPlugin plugin = getPlugin(tool, LabelMgrPlugin.class);
final OperandLabelDialog dialog = new OperandLabelDialog(plugin);
final GhidraComboBox combo = (GhidraComboBox) getInstanceField("myChoice", dialog);
final GhidraComboBox<?> combo = (GhidraComboBox<?>) getInstanceField("myChoice", dialog);
runSwing(new Runnable() {
@Override
public void run() {