Package ghidra.app.merge.listing

# Class ExternalFunctionMerger

java.lang.Object
ghidra.app.merge.listing.ExternalFunctionMerger

All Implemented Interfaces:
  `ListingMergeConstants`

public class ExternalFunctionMerger extends Object
Class for merging external function and label changes. This class can merge external function and label changes that were made to the checked out version. It can determine where there are conflicts between the latest checked in version and my checked out version. It can then allow the user to manually merge the conflicting functions and labels. External functions do not have bodies. However their signatures, stacks and variables do get merged. This class extends the AbstractFunctionMerger to handle merging of function changes when both My and Latest have changed functions.
Note: Externals are uniquely identified by symbol ID and the name (including namespace is also used to match externals when the external is transitioned from a label to a function and vice versa.
Important: This class is intended to be used only for a single program version merge. It should be constructed, followed by an autoMerge(), and lastly each external with a conflict should have mergeConflicts() called on it.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `protected static enum`
  `ExternalFunctionMerger.ExternalConflictType`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final int`
  `ALL_EXTERNAL_DIFFERENCES`
  `protected static final int`
  `BODY_CONFLICT_SIZE`
  `protected static final int`
  `BODY_CONFLICT_START`
  `protected int`
  `bodyChoice`
  `protected int`
  `changeNum`
  `protected ConflictPanel`
  `currentConflictPanel`
  `protected TaskMonitor`
  `currentMonitor`
  `protected static final int`
  `DETAILS_CONFLICT_SIZE`
  `protected static final int`
  `DETAILS_CONFLICT_START`
  `protected int`
  `detailsChoice`
  `protected StringBuffer`
  `errorBuf`
  `protected static final int`
  `EXTERNAL_ADDRESS`
  `protected static final int`
  `EXTERNAL_DATA_TYPE`
  `protected static final int`
  `EXTERNAL_FUNCTION`
  `protected static final int`
  `EXTERNAL_LABEL`
  `protected static final int`
  `EXTERNAL_NAMESPACE`
  `protected static final int`
  `EXTERNAL_SYMBOL_TYPE`
  `protected int`
  `externalAddChoice`
  `protected LongLongHashtable`
  `externalAddConflicts`
  `protected int`
  `externalDataTypeChoice`
  `protected AddressSet`
  `externalDataTypeConflicts`
  `protected ObjectIntHashtable<Address>`
  `externalDetailConflicts`
  `protected int`
  `externalDetailsChoice`
  `protected int`
  `externalFunctionChoice`
  `protected int`
  `externalFunctionRemovalChoice`
  `protected AddressSet`
  `externalFunctionVersusDataTypeConflicts`
  `protected int`
  `externalFunctionVsDataTypeChoice`
  `protected int`
  `externalRemoveChoice`
  `protected static final int`
  `FUNC_BODY`
  `protected static final int`
  `FUNC_CALLING_CONVENTION`
  `protected static final int`
  `FUNC_DETAIL_MASK`
  `protected static final int`
  `FUNC_INLINE`
  `protected static final int`
  `FUNC_LOCAL_DETAILS`
  `protected static final int`
  `FUNC_NAME`
  `protected static final int`
  `FUNC_NO_RETURN`
  `protected static final int`
  `FUNC_OVERLAP`
  `protected static final int`
  `FUNC_PARAM_DETAILS`
  `protected static final int`
  `FUNC_REMOVE`
  `protected static final int`
  `FUNC_RETURN`
  `protected static final int`
  `FUNC_RETURN_ADDRESS_OFFSET`
  `protected static final int`
  `FUNC_SIGNATURE`
  `protected static final int`
  `FUNC_SIGNATURE_SOURCE`
  `protected static final int`
  `FUNC_STACK_PURGE_SIZE`
  `protected static final int`
  `FUNC_THUNK`
  `protected static final int`
  `FUNC_VAR_STORAGE`
  `protected ObjectIntHashtable<Address>`
  `funcConflicts`
  `protected AddressSet`
  `funcSet`
  `protected static final int`
  `FUNCTION_CONFLICT_SIZE`
  `protected static final int`
  `FUNCTION_CONFLICT_START`
  `protected FunctionManager[]`
  `functionManagers`
  `protected int`
  `functionReturnChoice`
  `protected static final int`
  `HEADER`
  `protected static final int`
  `HIGHEST_DETAIL_BIT_SHIFT`
  `protected StringBuffer`
  `infoBuf`
  `static final int`
  `KEEP_BOTH_ADDS`
  Keep both of the external locations added in the LATEST and in MY when in conflict.
  `static final String`
  `KEEP_BOTH_BUTTON_NAME`
  `static final int`
  `KEEP_LATEST_ADD`
  Keep the external location added in LATEST to resolve a conflict.
  `static final int`
  `KEEP_MY_ADD`
  Keep the external location added in MY to resolve a conflict.
  `protected static final int`
  `LATEST`
  `protected static final int`
  `LATEST_VAR`
  `protected Map<Long,DataType>`
  `latestResolvedDts`
  `protected ListingMergeManager`
  `listingMergeManager`
  `protected ListingMergePanel`
  `listingMergePanel`
  `protected int`
  `localVariableDetailChoice`
  `static final int`
  `MERGE_BOTH_ADDS`
  Merge both of the external locations added in the LATEST and in MY when in conflict.
  `static final String`
  `MERGE_BOTH_BUTTON_NAME`
  `protected ProgramMultiUserMergeManager`
  `mergeManager`
  `protected static final int`
  `MY`
  `protected static final int`
  `MY_VAR`
  `protected Map<Long,DataType>`
  `myResolvedDts`
  `protected static final int`
  `ORIGINAL`
  `protected static final int`
  `ORIGINAL_VAR`
  `protected Map<Long,DataType>`
  `origResolvedDts`
  `protected int`
  `overlapChoice`
  `protected int`
  `parameterInfoChoice`
  `protected int`
  `parameterSignatureChoice`
  `protected Program[]`
  `programs`
  `protected int`
  `removeChoice`
  `protected int`
  `removedLocalVariableChoice`
  `protected static final int`
  `RESULT`
  `protected AddressFactory`
  `resultAddressFactory`
  `protected ScrollingListChoicesPanel`
  `scrollingListConflictPanel`
  `protected static final String[]`
  `STORAGE_CONFLICT_CHOICES`
  `protected static final String[]`
  `STORAGE_CONFLICT_HEADINGS`
  `protected int`
  `thunkChoice`
  `protected int`
  `totalChanges`
  `protected static final int`
  `VAR_COMMENT`
  `protected static final int`
  `VAR_DATATYPE`
  `protected static final int`
  `VAR_NAME`
  `protected static final int`
  `VAR_REMOVED`
  `protected int`
  `variableStorageChoice`
  `protected VariousChoicesPanel`
  `variousConflictPanel`
  `protected VerticalChoicesPanel`
  `verticalConflictPanel`

  ### Fields inherited from interface ghidra.app.merge.listing.ListingMergeConstants

  `ASK_USER, CANCELED, CHECKED_OUT_BUTTON_NAME, CHECKED_OUT_CHECK_BOX_NAME, CHECKED_OUT_LABEL_NAME, CHECKED_OUT_LIST_BUTTON_NAME, INFO_ROW, KEEP_ALL, KEEP_BOTH, KEEP_LATEST, KEEP_MY, KEEP_ORIGINAL, KEEP_RESULT, LATEST_BUTTON_NAME, LATEST_CHECK_BOX_NAME, LATEST_LABEL_NAME, LATEST_LIST_BUTTON_NAME, LATEST_TITLE, MY_TITLE, ORIGINAL_BUTTON_NAME, ORIGINAL_CHECK_BOX_NAME, ORIGINAL_LABEL_NAME, ORIGINAL_TITLE, REMOVE_CHECKED_OUT_BUTTON_NAME, REMOVE_LATEST, REMOVE_LATEST_BUTTON_NAME, REMOVE_MY, RENAME_CHECKED_OUT_BUTTON_NAME, RENAME_LATEST, RENAME_LATEST_BUTTON_NAME, RENAME_MY, RESULT_BUTTON_NAME, RESULT_TITLE, TRUNCATE_LENGTH`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ExternalFunctionMerger(ListingMergeManager listingMergeManager, boolean showListingPanel)`
  Manages changes and conflicts for externals between the latest versioned program and the modified program being checked into version control.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `allChoicesAreResolved()`
  `boolean`
  `apply()`
  `void`
  `autoMerge(int progressMin, int progressMax, TaskMonitor monitor)`
  `void`
  `cancel()`
  `protected void`
  `clearConflictPanel()`
  `protected int`
  `countSetBits(int bits)`
  `protected VariousChoicesPanel`
  `createFunctionConflictPanel(Function[] functions, TaskMonitor monitor)`
  `protected VerticalChoicesPanel`
  `createFunctionReturnConflictPanel(Function[] functions, TaskMonitor monitor)`
  `protected VariousChoicesPanel`
  `createLocalVariableConflictPanel(ghidra.app.merge.listing.AbstractFunctionMerger.LocalVariableConflict lvc, TaskMonitor monitor)`
  `protected VerticalChoicesPanel`
  `createParameterSigConflictPanel(Function[] functions, TaskMonitor monitor)`
  `protected VariousChoicesPanel`
  `createParamInfoConflictPanel(Function[] functions, ghidra.app.merge.listing.AbstractFunctionMerger.ParamInfoConflict pc, TaskMonitor monitor)`
  `protected VerticalChoicesPanel`
  `createRemoveConflictPanel(Function[] functions, TaskMonitor monitor)`
  `protected VerticalChoicesPanel`
  `createRemovedVarConflictPanel(ghidra.app.merge.listing.AbstractFunctionMerger.LocalVariableConflict lvc, TaskMonitor monitor)`
  Creates the panel for resolving a conflict due to a variable being removed.
  `protected ScrollingListChoicesPanel`
  `createStorageConflictPanel(Address entryPt, Pair<List<Variable>,List<Variable>> pair, TaskMonitor monitor)`
  `protected List<ghidra.app.merge.listing.AbstractFunctionMerger.ParamInfoConflict>`
  `determineParameterInfoConflicts(Function[] functions, boolean autoMerge, TaskMonitor monitor)`
  `protected boolean`
  `determineReturnConflict(Function[] functions, boolean autoMerge, TaskMonitor monitor)`
  `protected ghidra.app.merge.listing.FunctionVariableStorageConflicts`
  `determineStorageConflict(Function[] functions, TaskMonitor monitor)`
  `void`
  `dispose()`
  `int`
  `getConflictCount(Address addr)`
  `AddressSetView`
  `getConflicts()`
  `String`
  `getConflictType()`
  `String`
  `getDescription()`
  `protected ScrollingListChoicesPanel`
  `getEmptyScrollingListChoicesPanel()`
  `protected VariousChoicesPanel`
  `getEmptyVariousPanel()`
  `protected VerticalChoicesPanel`
  `getEmptyVerticalPanel()`
  `protected String`
  `getErrorTitle()`
  `protected String`
  `getFunctionPrompt(Address addr, Function function, String version)`
  `protected String`
  `getInfoTitle()`
  `String`
  `getName()`
  `int`
  `getNumConflictsResolved()`
  `protected String[]`
  `getReturnInfo(Program pgm, String returnStr, String prefix, String suffix)`
  `protected String`
  `getReturnString(Function func, boolean includeStorage)`
  `protected String[]`
  `getSignatureInfo(Program pgm, Function f, String prefix, String suffix)`
  `protected List<String[]>`
  `getVariableDetails(List<Variable> list)`
  `boolean`
  `hasConflict(Address addr)`
  `void`
  `init()`
  `protected void`
  `initializeAutoMerge(String progressMessage, int progressMin, int progressMax, TaskMonitor monitor)`
  `protected void`
  `mergeBasicExternalDetail(int type, ExternalLocation[] externalLocations, int currentChosenOption, TaskMonitor monitor)`
  `void`
  `mergeConflicts(int chosenConflictOption, ConflictInfoPanel listingConflictInfoPanel, TaskMonitor monitor)`
  Performs a manual merge of external program conflicts.
  `void`
  `mergeConflicts(ListingMergePanel listingPanel, Address addr, int conflictOption, TaskMonitor monitor)`
  `void`
  `mergeConflictsForAdd(ExternalLocation[] externalLocations, int chosenConflictOption, TaskMonitor monitor)`
  `void`
  `mergeFunction(ExternalLocation[] externalLocations, int currentChosenOption, TaskMonitor monitor)`
  `protected void`
  `mergeFunctionDetail(int type, Address entry, ProgramMerge pgmMerge, TaskMonitor monitor)`
  `protected void`
  `mergeLocal(Address entryPt, ghidra.app.merge.listing.AbstractFunctionMerger.LocalVariableConflict localVarConflict, int chosenConflictOption, TaskMonitor monitor)`
  `protected void`
  `mergeLocals(Address entryPt, List<ghidra.app.merge.listing.AbstractFunctionMerger.LocalVariableConflict> localVarConflicts, int chosenConflictOption, TaskMonitor monitor)`
  `protected void`
  `mergeParameter(int type, Address entry, int ordinal, int currentConflictOption, TaskMonitor monitor)`
  `protected void`
  `mergeParameter(int type, Function[] functions, int ordinal, int currentConflictOption, TaskMonitor monitor)`
  `protected void`
  `mergeParameters(Function[] functions, int chosenConflictOption, TaskMonitor monitor)`
  `protected void`
  `mergeParamInfo(Address entryPt, ghidra.app.merge.listing.AbstractFunctionMerger.ParamInfoConflict pc, int chosenConflictOption, TaskMonitor monitor)`
  `protected void`
  `mergeParamInfo(Address entryPt, List<ghidra.app.merge.listing.AbstractFunctionMerger.ParamInfoConflict> paramInfoConflicts, int chosenConflictOption, TaskMonitor monitor)`
  `protected void`
  `mergeParamInfo(Function[] functions, ghidra.app.merge.listing.AbstractFunctionMerger.ParamInfoConflict pc, int chosenConflictOption, TaskMonitor monitor)`
  `protected void`
  `mergeParamInfo(Function[] functions, List<ghidra.app.merge.listing.AbstractFunctionMerger.ParamInfoConflict> paramInfoConflicts, int chosenConflictOption, TaskMonitor monitor)`
  `protected void`
  `mergeVariableStorage(Address entryPt, Pair<List<Variable>,List<Variable>> pair, int currentConflictOption, TaskMonitor monitor)`
  `void`
  `refreshResultPanel(ExternalLocation[] externalLocations)`
  `void`
  `replaceExternalDataType(ExternalLocation resultExternalLocation, ExternalLocation fromExternalLocation, TaskMonitor monitor)`
  `replaceExternalDataType` replaces the data type of the external label in program1 with the data type of the external label in program2 at the specified external space address.
  `ExternalLocation`
  `replaceExternalLocation(ExternalLocation toExternalLocation, ExternalLocation fromExternalLocation, ProgramMerge programMerge, TaskMonitor monitor)`
  `protected void`
  `runSwing(Runnable r)`
  `protected void`
  `saveFunctionDetailConflict(Function[] functions, int type)`
  Saves information indicating there is a conflict that needs to be resolved for a particular part of a function as indicated by the type.
  `protected void`
  `updateProgressMessage(String message)`
  Updates the progress message details associated with this phase of the merge.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### EXTERNAL_NAMESPACE

    protected static final int EXTERNAL_NAMESPACE
    See Also:
      - Constant Field Values

  - ### EXTERNAL_LABEL

    protected static final int EXTERNAL_LABEL
    See Also:
      - Constant Field Values

  - ### EXTERNAL_ADDRESS

    protected static final int EXTERNAL_ADDRESS
    See Also:
      - Constant Field Values

  - ### EXTERNAL_SYMBOL_TYPE

    protected static final int EXTERNAL_SYMBOL_TYPE
    See Also:
      - Constant Field Values

  - ### EXTERNAL_DATA_TYPE

    protected static final int EXTERNAL_DATA_TYPE
    See Also:
      - Constant Field Values

  - ### EXTERNAL_FUNCTION

    protected static final int EXTERNAL_FUNCTION
    See Also:
      - Constant Field Values

  - ### HIGHEST_DETAIL_BIT_SHIFT

    protected static final int HIGHEST_DETAIL_BIT_SHIFT
    See Also:
      - Constant Field Values

  - ### ALL_EXTERNAL_DIFFERENCES

    protected static final int ALL_EXTERNAL_DIFFERENCES
    See Also:
      - Constant Field Values

  - ### KEEP_LATEST_ADD

    public static final int KEEP_LATEST_ADD
    Keep the external location added in LATEST to resolve a conflict.
    See Also:
      - Constant Field Values

  - ### KEEP_MY_ADD

    public static final int KEEP_MY_ADD
    Keep the external location added in MY to resolve a conflict.
    See Also:
      - Constant Field Values

  - ### KEEP_BOTH_ADDS

    public static final int KEEP_BOTH_ADDS
    Keep both of the external locations added in the LATEST and in MY when in conflict.
    See Also:
      - Constant Field Values

  - ### MERGE_BOTH_ADDS

    public static final int MERGE_BOTH_ADDS
    Merge both of the external locations added in the LATEST and in MY when in conflict.
    See Also:
      - Constant Field Values

  - ### KEEP_BOTH_BUTTON_NAME

    public static final String KEEP_BOTH_BUTTON_NAME
    See Also:
      - Constant Field Values

  - ### MERGE_BOTH_BUTTON_NAME

    public static final String MERGE_BOTH_BUTTON_NAME
    See Also:
      - Constant Field Values

  - ### externalDetailConflicts

    protected ObjectIntHashtable<Address> externalDetailConflicts

  - ### externalDataTypeConflicts

    protected AddressSet externalDataTypeConflicts

  - ### externalFunctionVersusDataTypeConflicts

    protected AddressSet externalFunctionVersusDataTypeConflicts

  - ### externalAddConflicts

    protected LongLongHashtable externalAddConflicts

  - ### totalChanges

    protected int totalChanges

  - ### changeNum

    protected int changeNum

  - ### externalFunctionRemovalChoice

    protected int externalFunctionRemovalChoice

  - ### externalFunctionChoice

    protected int externalFunctionChoice

  - ### externalDetailsChoice

    protected int externalDetailsChoice

  - ### externalDataTypeChoice

    protected int externalDataTypeChoice

  - ### externalFunctionVsDataTypeChoice

    protected int externalFunctionVsDataTypeChoice

  - ### externalAddChoice

    protected int externalAddChoice

  - ### externalRemoveChoice

    protected int externalRemoveChoice

  - ### BODY_CONFLICT_START

    protected static final int BODY_CONFLICT_START
    See Also:
      - Constant Field Values

  - ### BODY_CONFLICT_SIZE

    protected static final int BODY_CONFLICT_SIZE
    See Also:
      - Constant Field Values

  - ### FUNCTION_CONFLICT_START

    protected static final int FUNCTION_CONFLICT_START
    See Also:
      - Constant Field Values

  - ### FUNCTION_CONFLICT_SIZE

    protected static final int FUNCTION_CONFLICT_SIZE
    See Also:
      - Constant Field Values

  - ### DETAILS_CONFLICT_START

    protected static final int DETAILS_CONFLICT_START
    See Also:
      - Constant Field Values

  - ### DETAILS_CONFLICT_SIZE

    protected static final int DETAILS_CONFLICT_SIZE
    See Also:
      - Constant Field Values

  - ### FUNC_OVERLAP

    protected static final int FUNC_OVERLAP
    See Also:
      - Constant Field Values

  - ### FUNC_BODY

    protected static final int FUNC_BODY
    See Also:
      - Constant Field Values

  - ### FUNC_REMOVE

    protected static final int FUNC_REMOVE
    See Also:
      - Constant Field Values

  - ### FUNC_THUNK

    protected static final int FUNC_THUNK
    See Also:
      - Constant Field Values

  - ### FUNC_RETURN

    protected static final int FUNC_RETURN
    See Also:
      - Constant Field Values

  - ### FUNC_RETURN_ADDRESS_OFFSET

    protected static final int FUNC_RETURN_ADDRESS_OFFSET
    See Also:
      - Constant Field Values

  - ### FUNC_STACK_PURGE_SIZE

    protected static final int FUNC_STACK_PURGE_SIZE
    See Also:
      - Constant Field Values

  - ### FUNC_NAME

    protected static final int FUNC_NAME
    See Also:
      - Constant Field Values

  - ### FUNC_INLINE

    protected static final int FUNC_INLINE
    See Also:
      - Constant Field Values

  - ### FUNC_NO_RETURN

    protected static final int FUNC_NO_RETURN
    See Also:
      - Constant Field Values

  - ### FUNC_CALLING_CONVENTION

    protected static final int FUNC_CALLING_CONVENTION
    See Also:
      - Constant Field Values

  - ### FUNC_VAR_STORAGE

    protected static final int FUNC_VAR_STORAGE
    See Also:
      - Constant Field Values

  - ### FUNC_SIGNATURE

    protected static final int FUNC_SIGNATURE
    See Also:
      - Constant Field Values

  - ### FUNC_LOCAL_DETAILS

    protected static final int FUNC_LOCAL_DETAILS
    See Also:
      - Constant Field Values

  - ### FUNC_PARAM_DETAILS

    protected static final int FUNC_PARAM_DETAILS
    See Also:
      - Constant Field Values

  - ### FUNC_SIGNATURE_SOURCE

    protected static final int FUNC_SIGNATURE_SOURCE
    See Also:
      - Constant Field Values

  - ### FUNC_DETAIL_MASK

    protected static final int FUNC_DETAIL_MASK
    See Also:
      - Constant Field Values

  - ### VAR_NAME

    protected static final int VAR_NAME
    See Also:
      - Constant Field Values

  - ### VAR_DATATYPE

    protected static final int VAR_DATATYPE
    See Also:
      - Constant Field Values

  - ### VAR_COMMENT

    protected static final int VAR_COMMENT
    See Also:
      - Constant Field Values

  - ### VAR_REMOVED

    protected static final int VAR_REMOVED
    See Also:
      - Constant Field Values

  - ### HEADER

    protected static final int HEADER
    See Also:
      - Constant Field Values

  - ### RESULT

    protected static final int RESULT
    See Also:
      - Constant Field Values

  - ### LATEST

    protected static final int LATEST
    See Also:
      - Constant Field Values

  - ### MY

    protected static final int MY
    See Also:
      - Constant Field Values

  - ### ORIGINAL

    protected static final int ORIGINAL
    See Also:
      - Constant Field Values

  - ### ORIGINAL_VAR

    protected static final int ORIGINAL_VAR
    See Also:
      - Constant Field Values

  - ### LATEST_VAR

    protected static final int LATEST_VAR
    See Also:
      - Constant Field Values

  - ### MY_VAR

    protected static final int MY_VAR
    See Also:
      - Constant Field Values

  - ### errorBuf

    protected StringBuffer errorBuf

  - ### infoBuf

    protected StringBuffer infoBuf

  - ### mergeManager

    protected ProgramMultiUserMergeManager mergeManager

  - ### programs

    protected Program[] programs

  - ### functionManagers

    protected FunctionManager[] functionManagers

  - ### listingMergeManager

    protected ListingMergeManager listingMergeManager

  - ### resultAddressFactory

    protected AddressFactory resultAddressFactory

  - ### latestResolvedDts

    protected Map<Long,DataType> latestResolvedDts

  - ### myResolvedDts

    protected Map<Long,DataType> myResolvedDts

  - ### origResolvedDts

    protected Map<Long,DataType> origResolvedDts

  - ### listingMergePanel

    protected ListingMergePanel listingMergePanel

  - ### verticalConflictPanel

    protected VerticalChoicesPanel verticalConflictPanel

  - ### variousConflictPanel

    protected VariousChoicesPanel variousConflictPanel

  - ### scrollingListConflictPanel

    protected ScrollingListChoicesPanel scrollingListConflictPanel

  - ### currentConflictPanel

    protected ConflictPanel currentConflictPanel

  - ### currentMonitor

    protected TaskMonitor currentMonitor

  - ### overlapChoice

    protected int overlapChoice

  - ### bodyChoice

    protected int bodyChoice

  - ### functionReturnChoice

    protected int functionReturnChoice

  - ### removeChoice

    protected int removeChoice

  - ### detailsChoice

    protected int detailsChoice

  - ### variableStorageChoice

    protected int variableStorageChoice

  - ### parameterSignatureChoice

    protected int parameterSignatureChoice

  - ### parameterInfoChoice

    protected int parameterInfoChoice

  - ### removedLocalVariableChoice

    protected int removedLocalVariableChoice

  - ### localVariableDetailChoice

    protected int localVariableDetailChoice

  - ### thunkChoice

    protected int thunkChoice

  - ### funcConflicts

    protected ObjectIntHashtable<Address> funcConflicts

  - ### funcSet

    protected AddressSet funcSet

  - ### STORAGE_CONFLICT_CHOICES

    protected static final String[] STORAGE_CONFLICT_CHOICES

  - ### STORAGE_CONFLICT_HEADINGS

    protected static final String[] STORAGE_CONFLICT_HEADINGS

- ## Constructor Details

  - ### ExternalFunctionMerger

    public ExternalFunctionMerger(ListingMergeManager listingMergeManager, boolean showListingPanel)
    Manages changes and conflicts for externals between the latest versioned program and the modified program being checked into version control.
    Parameters:
      `listingMergeManager` - the top level merge manager for merging a program version.
      `showListingPanel` - true to show the listing panel.

- ## Method Details

  - ### init

    public void init()

  - ### getName

    public String getName()

  - ### getDescription

    public String getDescription()

  - ### allChoicesAreResolved

    public boolean allChoicesAreResolved()

  - ### apply

    public boolean apply()

  - ### cancel

    public void cancel()

  - ### autoMerge

    public void autoMerge(int progressMin, int progressMax, TaskMonitor monitor) throws ProgramConflictException, MemoryAccessException, CancelledException
    Throws:
      `ProgramConflictException`
      `MemoryAccessException`
      `CancelledException`

  - ### initializeAutoMerge

    protected void initializeAutoMerge(String progressMessage, int progressMin, int progressMax, TaskMonitor monitor)

  - ### replaceExternalDataType

    public void replaceExternalDataType(ExternalLocation resultExternalLocation, ExternalLocation fromExternalLocation, TaskMonitor monitor) throws CancelledException
    `replaceExternalDataType` replaces the data type of the external label in program1 with the data type of the external label in program2 at the specified external space address.
    Parameters:
      `resultExternalLocation` -
      `fromExternalLocation` -
      `monitor` - the task monitor for notifying the user of this merge's progress.
    Throws:
      `CancelledException`

  - ### mergeConflicts

    public void mergeConflicts(int chosenConflictOption, ConflictInfoPanel listingConflictInfoPanel, TaskMonitor monitor) throws CancelledException
    Performs a manual merge of external program conflicts.
    Parameters:
      `chosenConflictOption` - ASK_USER means interactively resolve conflicts. JUnit testing also allows setting this to LATEST, MY, or ORIGINAL to force selection of a particular version change.
      `monitor` - task monitor for informing the user of progress.
    Throws:
      `CancelledException` - if the user cancels the merge.

  - ### mergeConflictsForAdd

    public void mergeConflictsForAdd(ExternalLocation[] externalLocations, int chosenConflictOption, TaskMonitor monitor) throws CancelledException
    Throws:
      `CancelledException`

  - ### createParamInfoConflictPanel

    protected VariousChoicesPanel createParamInfoConflictPanel(Function[] functions, ghidra.app.merge.listing.AbstractFunctionMerger.ParamInfoConflict pc, TaskMonitor monitor)

  - ### replaceExternalLocation

    public ExternalLocation replaceExternalLocation(ExternalLocation toExternalLocation, ExternalLocation fromExternalLocation, ProgramMerge programMerge, TaskMonitor monitor) throws DuplicateNameException, InvalidInputException, CancelledException
    Throws:
      `DuplicateNameException`
      `InvalidInputException`
      `CancelledException`

  - ### mergeBasicExternalDetail

    protected void mergeBasicExternalDetail(int type, ExternalLocation[] externalLocations, int currentChosenOption, TaskMonitor monitor) throws CancelledException
    Throws:
      `CancelledException`

  - ### mergeFunction

    public void mergeFunction(ExternalLocation[] externalLocations, int currentChosenOption, TaskMonitor monitor) throws CancelledException, UnsupportedOperationException
    Throws:
      `CancelledException`
      `UnsupportedOperationException`

  - ### refreshResultPanel

    public void refreshResultPanel(ExternalLocation[] externalLocations)

  - ### saveFunctionDetailConflict

    protected void saveFunctionDetailConflict(Function[] functions, int type)
    Saves information indicating there is a conflict that needs to be resolved for a particular part of a function as indicated by the type.
    Parameters:
      `functions` - the matching set of functions from Result, Latest, My, and Original (Some may be null) which have the detailed type of conflict.
      `type` - function conflict flags to be set (FUNC_RETURN_TYPE, FUNC_RETURN_ADDRESS_OFFSET, FUNC_STACK_PURGE_SIZE, FUNC_NAME FUNC_INLINE, FUNC_NO_RETURN, FUNC_CALLING_CONVENTION, FUNC_VAR_STORAGE FUNC_CUSTOM_STORAGE, FUNC_VAR_DETAILS, FUNC_SIGNATURE)

  - ### getConflictType

    public String getConflictType()

  - ### getNumConflictsResolved

    public int getNumConflictsResolved()

  - ### hasConflict

    public boolean hasConflict(Address addr)

  - ### getConflictCount

    public int getConflictCount(Address addr)

  - ### mergeConflicts

    public void mergeConflicts(ListingMergePanel listingPanel, Address addr, int conflictOption, TaskMonitor monitor) throws CancelledException, MemoryAccessException
    Throws:
      `CancelledException`
      `MemoryAccessException`

  - ### getConflicts

    public AddressSetView getConflicts()

  - ### getInfoTitle

    protected String getInfoTitle()

  - ### getErrorTitle

    protected String getErrorTitle()

  - ### dispose

    public void dispose()

  - ### determineStorageConflict

    protected ghidra.app.merge.listing.FunctionVariableStorageConflicts determineStorageConflict(Function[] functions, TaskMonitor monitor) throws CancelledException
    Throws:
      `CancelledException`

  - ### determineReturnConflict

    protected boolean determineReturnConflict(Function[] functions, boolean autoMerge, TaskMonitor monitor)

  - ### determineParameterInfoConflicts

    protected List<ghidra.app.merge.listing.AbstractFunctionMerger.ParamInfoConflict> determineParameterInfoConflicts(Function[] functions, boolean autoMerge, TaskMonitor monitor)

  - ### mergeParameter

    protected void mergeParameter(int type, Address entry, int ordinal, int currentConflictOption, TaskMonitor monitor)

  - ### mergeParameter

    protected void mergeParameter(int type, Function[] functions, int ordinal, int currentConflictOption, TaskMonitor monitor)

  - ### countSetBits

    protected int countSetBits(int bits)

  - ### mergeFunctionDetail

    protected void mergeFunctionDetail(int type, Address entry, ProgramMerge pgmMerge, TaskMonitor monitor)

  - ### mergeParameters

    protected void mergeParameters(Function[] functions, int chosenConflictOption, TaskMonitor monitor)

  - ### mergeParamInfo

    protected void mergeParamInfo(Address entryPt, List<ghidra.app.merge.listing.AbstractFunctionMerger.ParamInfoConflict> paramInfoConflicts, int chosenConflictOption, TaskMonitor monitor) throws CancelledException
    Throws:
      `CancelledException`

  - ### mergeParamInfo

    protected void mergeParamInfo(Address entryPt, ghidra.app.merge.listing.AbstractFunctionMerger.ParamInfoConflict pc, int chosenConflictOption, TaskMonitor monitor)

  - ### mergeParamInfo

    protected void mergeParamInfo(Function[] functions, List<ghidra.app.merge.listing.AbstractFunctionMerger.ParamInfoConflict> paramInfoConflicts, int chosenConflictOption, TaskMonitor monitor) throws CancelledException
    Throws:
      `CancelledException`

  - ### mergeParamInfo

    protected void mergeParamInfo(Function[] functions, ghidra.app.merge.listing.AbstractFunctionMerger.ParamInfoConflict pc, int chosenConflictOption, TaskMonitor monitor)

  - ### mergeLocals

    protected void mergeLocals(Address entryPt, List<ghidra.app.merge.listing.AbstractFunctionMerger.LocalVariableConflict> localVarConflicts, int chosenConflictOption, TaskMonitor monitor) throws CancelledException
    Throws:
      `CancelledException`

  - ### mergeLocal

    protected void mergeLocal(Address entryPt, ghidra.app.merge.listing.AbstractFunctionMerger.LocalVariableConflict localVarConflict, int chosenConflictOption, TaskMonitor monitor) throws CancelledException
    Throws:
      `CancelledException`

  - ### getEmptyVerticalPanel

    protected VerticalChoicesPanel getEmptyVerticalPanel()

  - ### getEmptyScrollingListChoicesPanel

    protected ScrollingListChoicesPanel getEmptyScrollingListChoicesPanel()

  - ### getEmptyVariousPanel

    protected VariousChoicesPanel getEmptyVariousPanel()

  - ### getReturnString

    protected String getReturnString(Function func, boolean includeStorage)

  - ### getReturnInfo

    protected String[] getReturnInfo(Program pgm, String returnStr, String prefix, String suffix)

  - ### getSignatureInfo

    protected String[] getSignatureInfo(Program pgm, Function f, String prefix, String suffix)

  - ### clearConflictPanel

    protected void clearConflictPanel()

  - ### runSwing

    protected void runSwing(Runnable r)

  - ### createLocalVariableConflictPanel

    protected VariousChoicesPanel createLocalVariableConflictPanel(ghidra.app.merge.listing.AbstractFunctionMerger.LocalVariableConflict lvc, TaskMonitor monitor)

  - ### createRemoveConflictPanel

    protected VerticalChoicesPanel createRemoveConflictPanel(Function[] functions, TaskMonitor monitor)

  - ### createStorageConflictPanel

    protected ScrollingListChoicesPanel createStorageConflictPanel(Address entryPt, Pair<List<Variable>,List<Variable>> pair, TaskMonitor monitor)

  - ### mergeVariableStorage

    protected void mergeVariableStorage(Address entryPt, Pair<List<Variable>,List<Variable>> pair, int currentConflictOption, TaskMonitor monitor) throws CancelledException
    Throws:
      `CancelledException`

  - ### getVariableDetails

    protected List<String[]> getVariableDetails(List<Variable> list)

  - ### createParameterSigConflictPanel

    protected VerticalChoicesPanel createParameterSigConflictPanel(Function[] functions, TaskMonitor monitor)

  - ### createFunctionConflictPanel

    protected VariousChoicesPanel createFunctionConflictPanel(Function[] functions, TaskMonitor monitor)

  - ### createFunctionReturnConflictPanel

    protected VerticalChoicesPanel createFunctionReturnConflictPanel(Function[] functions, TaskMonitor monitor)

  - ### createRemovedVarConflictPanel

    protected VerticalChoicesPanel createRemovedVarConflictPanel(ghidra.app.merge.listing.AbstractFunctionMerger.LocalVariableConflict lvc, TaskMonitor monitor)
    Creates the panel for resolving a conflict due to a variable being removed.
    Parameters:
      `lvc` - the local variable conflict
      `monitor` - status monitor
    Returns:
      the panel

  - ### getFunctionPrompt

    protected String getFunctionPrompt(Address addr, Function function, String version)

  - ### updateProgressMessage

    protected void updateProgressMessage(String message)
    Updates the progress message details associated with this phase of the merge.
    Parameters:
      `message` - a message indicating what is currently occurring in this phase. Null indicates to use the default message.