From e9fb18faee0afbe83a48c2e65b3ce3ce6342247b Mon Sep 17 00:00:00 2001 From: dragonmacher <48328597+dragonmacher@users.noreply.github.com> Date: Fri, 4 Apr 2025 15:56:16 -0400 Subject: [PATCH] GP-5326 - Decompiler - Added a quick field edit action to the Decompiler --- .../main/help/help/topics/DataPlugin/Data.htm | 10 +- .../app/plugin/core/data/DataPlugin.java | 66 ++-- .../plugin/core/data/EditDataFieldDialog.java | 318 ++++++++++++------ .../plugin/core/data/EditFieldDialogTest.java | 31 +- .../core/decompile/DecompilerProvider.java | 5 + .../decompile/actions/EditFieldAction.java | 131 ++++++++ .../DecompilerEditDataFieldTest.java | 292 ++++++++++++++++ ...ateTest.java => DecompilerEquateTest.java} | 6 +- ...est.java => DecompilerHighSymbolTest.java} | 6 +- ....java => DecompilerSpecExtensionTest.java} | 6 +- .../datatype/finder/DecompilerReference.java | 12 + 11 files changed, 729 insertions(+), 154 deletions(-) create mode 100644 Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/EditFieldAction.java create mode 100644 Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/plugin/core/decompile/DecompilerEditDataFieldTest.java rename Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/plugin/core/decompile/{EquateTest.java => DecompilerEquateTest.java} (99%) rename Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/plugin/core/decompile/{HighSymbolTest.java => DecompilerHighSymbolTest.java} (99%) rename Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/plugin/core/decompile/{SpecExtensionTest.java => DecompilerSpecExtensionTest.java} (99%) diff --git a/Ghidra/Features/Base/src/main/help/help/topics/DataPlugin/Data.htm b/Ghidra/Features/Base/src/main/help/help/topics/DataPlugin/Data.htm index 240fd2e5e5..43377f3973 100644 --- a/Ghidra/Features/Base/src/main/help/help/topics/DataPlugin/Data.htm +++ b/Ghidra/Features/Base/src/main/help/help/topics/DataPlugin/Data.htm @@ -972,19 +972,21 @@
  1. Right mouse click on a structure member in the Listing
  2. -
  3. Choose the Data Edit Field +
  4. Choose the Data Quick Edit Field action to bring the up the Edit Field Dialog
-

The second way is more useful for changing the names of multiple members:

+

The second way is more useful for changing the names of multiple members. This method + will show the full Structure Editor: +

  1. Place the cursor on the first line of the structure
  2. Press mouse-right over the structure and choose Data Edit Data Type...
  3. + "help/shared/arrow.gif"> Edit Data Type
  4. Edit the field name for the structure member
@@ -1369,7 +1371,7 @@ bringing up the entire structure or union editor. To edit a field, click anywhere on the line displaying that field in the listing and then right click and select Data Edit Field from the popup context menu.

-

Edit Field Dialog

+

Edit Field Dialog