Package ghidra.app.merge.listing
Class ProgramContextMergeManager
java.lang.Object
ghidra.app.merge.listing.ProgramContextMergeManager
- All Implemented Interfaces:
ListingMergeConstants
,MergeResolver
public class ProgramContextMergeManager
extends Object
implements MergeResolver, ListingMergeConstants
ProgramContextMergeManager
merges register value changes
for multi-user program versions. It merges changes for each named register
in the program.
Note: If a register gets changed that is part of another register that has been set, then each named register will get merged independently. This means that when in conflict with another version the conflict would arise for each instead of just the larger register.
-
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
ConstructorDescriptionProgramContextMergeManager
(ProgramMultiUserMergeManager mergeManager, Program resultPgm, Program originalPgm, Program latestPgm, Program myPgm, ProgramChangeSet latestChanges, ProgramChangeSet myChanges) Creates a newProgramContextMergeManager
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply()
Notification that the apply button was hit.void
cancel()
Notification that the merge process was canceled.Get the description of what this MergeResolver does.getName()
Get the name of this MergeResolver.String[][]
Gets identifiers for the merge phases handled by this MergeResolver.void
merge
(TaskMonitor monitor) Perform the merge process.
-
Constructor Details
-
ProgramContextMergeManager
public ProgramContextMergeManager(ProgramMultiUserMergeManager mergeManager, Program resultPgm, Program originalPgm, Program latestPgm, Program myPgm, ProgramChangeSet latestChanges, ProgramChangeSet myChanges) Creates a newProgramContextMergeManager
.- Parameters:
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 Details
-
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
Description copied from interface:MergeResolver
Get the description of what this MergeResolver does.- Specified by:
getDescription
in interfaceMergeResolver
-
getName
Description copied from interface:MergeResolver
Get the name of this MergeResolver.- Specified by:
getName
in interfaceMergeResolver
-
merge
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
-
getPhases
Description copied from interface:MergeResolver
Gets identifiers for the merge phases handled by this MergeResolver. If the merge has no sub-phases then return an array with a single string array. Each inner String array indicates a path for a single merge phase. Each outer array element represents a phase whose progress we wish to indicate.
Examples:
So for a simple phase which has no sub-phases returnnew String[][] {new String[] {"Phase A"}}
So for a phase with 2 sub-phases returnnew String[][] { new String[] {"Phase A"}, new String[] {"Phase A", "Sub-Phase 1}, new String[] {"Phase A", "Sub-Phase 2} }
.- Specified by:
getPhases
in interfaceMergeResolver
- Returns:
- an array of phases.
-