Package ghidra.app.merge.listing
Class ListingMergeManager
- java.lang.Object
-
- ghidra.app.merge.listing.ListingMergeManager
-
- All Implemented Interfaces:
ListingMergeConstants
,MergeResolver
public class ListingMergeManager extends java.lang.Object implements MergeResolver, ListingMergeConstants
Manages program listing changes and conflicts between the latest versioned program (LATEST) and the modified program (MY) being checked into version control.
Listing changes include:- bytes
- code units [instructions and data]
- equates
- functions
- symbols
- references [memory, stack, and external]
- comments [plate, pre, end-of-line, repeatable, and post]/li>
- properties
- bookmarks
-
-
Field Summary
-
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 ListingMergeManager(ProgramMultiUserMergeManager mergeManager, Program resultPgm, Program originalPgm, Program latestPgm, Program myPgm, ProgramChangeSet latestChanges, ProgramChangeSet myChanges)
Manages listing changes and conflicts between the latest versioned program and the modified program being checked into version control.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply()
Notification that the apply button was hit.void
cancel()
Notification that the merge process was canceled.java.lang.String
getDescription()
Get the description of what this MergeResolver does.FunctionTagListingMerger
getFunctionTagListingMerger()
AddressSet
getMergedCodeUnits()
Gets the address set for the code units that were changed in the result by the merge.java.lang.String
getName()
Get the name of this MergeResolver.java.lang.String[][]
getPhases()
This method returns all of the phases of the Listing Merge Manager that will be displayed in the Program Merge Manager.void
initMergeInfo()
Sets up the change address sets, Diffs between the various program versions, and Merges from various versions to the resulting program.void
merge(TaskMonitor monitor)
Perform the merge process.void
setShowListingPanel(boolean showListingPanel)
True signals to show the listing panel (default); false signals to show an empty listing (faster)
-
-
-
Constructor Detail
-
ListingMergeManager
public ListingMergeManager(ProgramMultiUserMergeManager mergeManager, Program resultPgm, Program originalPgm, Program latestPgm, Program myPgm, ProgramChangeSet latestChanges, ProgramChangeSet myChanges)
Manages listing changes and conflicts between the latest versioned program and the modified program being checked into version control.- Parameters:
mergeManager
- the top level merge manager for merging a program version.resultPgm
- the program to be updated with the result of the merge. This is the program that will actually get checked in.originalPgm
- the program that was checked out.latestPgm
- the latest checked-in version of the program.myPgm
- the program requesting to be checked in.latestChanges
- the address set of changes between original and latest versioned program.myChanges
- the address set of changes between original and my modified program.
-
-
Method Detail
-
getFunctionTagListingMerger
public FunctionTagListingMerger getFunctionTagListingMerger()
-
setShowListingPanel
public void setShowListingPanel(boolean showListingPanel)
True signals to show the listing panel (default); false signals to show an empty listing (faster)- Parameters:
showListingPanel
-
-
apply
public void apply()
Description copied from interface:MergeResolver
Notification that the apply button was hit.- Specified by:
apply
in interfaceMergeResolver
-
cancel
public void cancel()
Description copied from interface:MergeResolver
Notification that the merge process was canceled.- Specified by:
cancel
in interfaceMergeResolver
-
getDescription
public java.lang.String getDescription()
Description copied from interface:MergeResolver
Get the description of what this MergeResolver does.- Specified by:
getDescription
in interfaceMergeResolver
-
getName
public java.lang.String getName()
Description copied from interface:MergeResolver
Get the name of this MergeResolver.- Specified by:
getName
in interfaceMergeResolver
-
merge
public void merge(TaskMonitor monitor) throws ProgramConflictException, MemoryAccessException
Description copied from interface:MergeResolver
Perform the merge process.- Specified by:
merge
in interfaceMergeResolver
- Parameters:
monitor
- monitor that allows the user to cancel the merge operation- Throws:
ProgramConflictException
MemoryAccessException
-
initMergeInfo
public void initMergeInfo()
Sets up the change address sets, Diffs between the various program versions, and Merges from various versions to the resulting program.
-
getMergedCodeUnits
public AddressSet getMergedCodeUnits()
Gets the address set for the code units that were changed in the result by the merge.- Returns:
- the address set indicating the code units that changed in the result program due to the merge
-
getPhases
public java.lang.String[][] getPhases()
This method returns all of the phases of the Listing Merge Manager that will be displayed in the Program Merge Manager. The first item is a phase indicator for the Listing Phase as a whole and the others are for each sub-phase of the Listing.- Specified by:
getPhases
in interfaceMergeResolver
- Returns:
- an array of phases.
-
-