Class StructureMergeDialog

java.lang.Object
docking.DialogComponentProvider
ghidra.app.merge.structures.StructureMergeDialog
All Implemented Interfaces:
ActionContextProvider, StatusListener, TaskListener

public class StructureMergeDialog extends DialogComponentProvider
Dialog for merging structures. The dialog is constructed given two structures and it will merge them, producing a third merged structure. The dialog will then display all three structures and provide controls for dealing with conflicts, allowing the user to choose components from the left or right side structures.

The dialog itself doesn't do anything with the resulting merged structure. Clients need to provide an apply consumer that will be called when the user presses the dialog's apply button.

The dialog also provides the following actions as keyboard only actions:

  1. Apply Item (<SPACE>): pressing the space bar key will apply the currently focussed and selected item from either the left side or right sided. (Assuming it is applicable).
  2. Focus Left Side (<LEFT ARROW>): pressing the left arrow will give focus to the left side display.
  3. Focus Right Side (<RIGHT ARROW>): pressing the right arrow will give focus to the right side display.
  • Constructor Details

    • StructureMergeDialog

      public StructureMergeDialog(String title, Structure struct1, Structure struct2, ExceptionalConsumer<Structure, Exception> applyConsumer)
      Constructor
      Parameters:
      title - the dialog title.
      struct1 - the first structure (will receive precedence for any conflicting components
      struct2 - the second structure
      applyConsumer - the consumer to call when the user presses the apply button. This consumer can throw an exception which will be displayed in the dialog and the dialog won't close. If the apply does not throw an exception, the dialog will be closed.
  • Method Details