Package ghidra.app.merge
Class ProgramMultiUserMergeManager
- java.lang.Object
-
- ghidra.app.merge.MergeManager
-
- ghidra.app.merge.ProgramMultiUserMergeManager
-
- All Implemented Interfaces:
MergeProgressModifier
,DomainObjectMergeManager
public class ProgramMultiUserMergeManager extends MergeManager
Top level object that manages each step of the merge/resolve conflicts process.
-
-
Field Summary
-
Fields inherited from class ghidra.app.merge.MergeManager
currentIndex, inputReceived, latestChangeSet, latestDomainObject, mergeCompleted, mergeMonitor, mergePlugin, mergeProgressPanel, mergeResolvers, mergeStatus, mergeTool, mergeToolIsVisible, myChangeSet, myDomainObject, originalDomainObject, prompting, resolveMap, resultDomainObject, runManager
-
-
Constructor Summary
Constructors Constructor Description ProgramMultiUserMergeManager(Program resultProgram, Program myProgram, Program originalProgram, Program latestProgram, ProgramChangeSet latestChangeSet, ProgramChangeSet myChangeSet)
ProgramMultiUserMergeManager(Program resultProgram, Program myProgram, Program originalProgram, Program latestProgram, ProgramChangeSet latestChangeSet, ProgramChangeSet myChangeSet, boolean showListingPanels)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
cleanupMerge()
protected MergeManagerPlugin
createMergeManagerPlugin(ModalPluginTool mergePluginTool, MergeManager multiUserMergeManager, UndoableDomainObject modifiableDomainObject)
protected void
createMergeResolvers()
ListingMergePanel
getListingMergePanel()
Returns the listing merge panel.Program
getProgram(int version)
Returns one of the four programs involved in the merge as indicated by the version.protected void
initializeMerge()
boolean
isMergeToolVisible()
Determines if the modal merge tool is currently displayed on the screen.boolean
isShowingListingMergePanel()
Determines if the four program Listing merge panel is currently displayed in the merge tool.void
refreshListingMergePanel(Address resultAddress, Address latestAddress, Address myAddress, Address originalAddress)
Show the listing merge panel with each listing positioned to the indicated address.void
removeListingMergePanel()
Remove the listing merge panel from the merge manager.void
showComponent(javax.swing.JComponent comp, java.lang.String componentID, HelpLocation helpLoc)
Show the component that is used to resolve conflicts.void
showDefaultMergePanel(java.lang.String description)
Show the default merge panel.void
showListingMergePanel(Address goToAddress)
Show the listing merge panel.void
showListingMergePanel(Address resultAddress, Address latestAddress, Address myAddress, Address originalAddress)
Show the listing merge panel with each listing positioned to the indicated address.-
Methods inherited from class ghidra.app.merge.MergeManager
clearStatusText, getDomainObject, getMergeProgressPanel, getMergeResolverByName, getMergeTool, getMonitorComponent, getPreferredMergeToolSize, getResolveInformation, isPromptingUser, merge, merge, processingCompleted, removeComponent, setApplyEnabled, setCompleted, setInProgress, setResolveInformation, setStatusText, showMergeTool, showMonitorComponent, showProgressIcon, updateProgress, updateProgress, updateProgress, waitForInput
-
-
-
-
Constructor Detail
-
ProgramMultiUserMergeManager
public ProgramMultiUserMergeManager(Program resultProgram, Program myProgram, Program originalProgram, Program latestProgram, ProgramChangeSet latestChangeSet, ProgramChangeSet myChangeSet)
-
ProgramMultiUserMergeManager
public ProgramMultiUserMergeManager(Program resultProgram, Program myProgram, Program originalProgram, Program latestProgram, ProgramChangeSet latestChangeSet, ProgramChangeSet myChangeSet, boolean showListingPanels)
-
-
Method Detail
-
createMergeResolvers
protected void createMergeResolvers()
- Specified by:
createMergeResolvers
in classMergeManager
-
getProgram
public Program getProgram(int version)
Returns one of the four programs involved in the merge as indicated by the version.- Parameters:
version
- the program version to return. (LATEST, MY, ORIGINAL, or RESULT).- Returns:
- the indicated program version or null if a valid version isn't specified.
- See Also:
MergeConstants
-
createMergeManagerPlugin
protected MergeManagerPlugin createMergeManagerPlugin(ModalPluginTool mergePluginTool, MergeManager multiUserMergeManager, UndoableDomainObject modifiableDomainObject)
- Specified by:
createMergeManagerPlugin
in classMergeManager
-
initializeMerge
protected void initializeMerge()
- Specified by:
initializeMerge
in classMergeManager
-
cleanupMerge
protected void cleanupMerge()
- Specified by:
cleanupMerge
in classMergeManager
-
showDefaultMergePanel
public void showDefaultMergePanel(java.lang.String description)
Show the default merge panel. The default merge panel now shows the status of each phase of the merge and also the progress in the current phase.- Overrides:
showDefaultMergePanel
in classMergeManager
- Parameters:
description
- description of current merge process near the top of the merge tool.
-
showComponent
public void showComponent(javax.swing.JComponent comp, java.lang.String componentID, HelpLocation helpLoc)
Show the component that is used to resolve conflicts. This method is called by the MergeResolvers when user input is required. If the component is not null, this method blocks until the user either cancels the merge process or resolves a conflict. If comp is null, then the default component is displayed, and the method does not wait for user input.- Specified by:
showComponent
in interfaceDomainObjectMergeManager
- Overrides:
showComponent
in classMergeManager
- Parameters:
comp
- component to show; if component is null, show the default component and do not blockcomponentID
- id or name for the component
-
showListingMergePanel
public void showListingMergePanel(Address goToAddress)
Show the listing merge panel.- Parameters:
show
- true indicates to show the Listing merge panel. false indicates show the default component.goToAddress
-
-
refreshListingMergePanel
public void refreshListingMergePanel(Address resultAddress, Address latestAddress, Address myAddress, Address originalAddress)
Show the listing merge panel with each listing positioned to the indicated address. A null can be passed for any address to indicate that listing should be empty.- Parameters:
resultAddress
- the address for positioning the Result program's listing.latestAddress
- the address for positioning the Latest program's listing.myAddress
- the address for positioning the My program's listing.originalAddress
- the address for positioning the Original program's listing.
-
showListingMergePanel
public void showListingMergePanel(Address resultAddress, Address latestAddress, Address myAddress, Address originalAddress)
Show the listing merge panel with each listing positioned to the indicated address. A null can be passed for any address to indicate that listing should be empty.- Parameters:
resultAddress
- the address for positioning the Result program's listing.latestAddress
- the address for positioning the Latest program's listing.myAddress
- the address for positioning the My program's listing.originalAddress
- the address for positioning the Original program's listing.
-
removeListingMergePanel
public void removeListingMergePanel()
Remove the listing merge panel from the merge manager.
-
getListingMergePanel
public ListingMergePanel getListingMergePanel()
Returns the listing merge panel. This is the panel containing the four listing windows: result, latest, my, and original. The four listings are the center component of JPanel with a BorderLayout.
-
isMergeToolVisible
public boolean isMergeToolVisible()
Determines if the modal merge tool is currently displayed on the screen.- Overrides:
isMergeToolVisible
in classMergeManager
- Returns:
- true if the merge tool is displayed.
-
isShowingListingMergePanel
public boolean isShowingListingMergePanel()
Determines if the four program Listing merge panel is currently displayed in the merge tool.- Returns:
- true if the Listing merge panel is displayed.
-
-