Package ghidra.app.merge
Class MergeManagerPlugin
- java.lang.Object
-
- ghidra.framework.plugintool.Plugin
-
- ghidra.app.merge.MergeManagerPlugin
-
- All Implemented Interfaces:
ProgramaticUseOnly,DomainObjectListener,PluginEventListener,ServiceListener,ExtensionPoint,java.util.EventListener
- Direct Known Subclasses:
DataTypeArchiveMergeManagerPlugin,ProgramMergeManagerPlugin
public abstract class MergeManagerPlugin extends Plugin implements ProgramaticUseOnly, DomainObjectListener
Plugin that provides a merge component provider.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ghidra.util.classfinder.ExtensionPoint
ExtensionPoint.Exclude, ExtensionPoint.Util
-
-
Field Summary
Fields Modifier and Type Field Description protected UndoableDomainObjectcurrentDomainObjectprotected MergeManagermergeManagerprotected ghidra.app.merge.MergeManagerProviderprovider-
Fields inherited from class ghidra.framework.plugintool.Plugin
name, pluginDescription, tool
-
-
Constructor Summary
Constructors Constructor Description MergeManagerPlugin(PluginTool tool, MergeManager mergeManager, UndoableDomainObject domainObject)Constructor for plugin that handles multi-user merge of programs.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancanClose()Called to force this plugin to terminate any tasks it has running and apply any unsaved data to domain objects or files.booleancloseAllDomainObjects(boolean ignoreChanges)booleancloseDomainObject()booleancloseDomainObject(UndoableDomainObject domainObject, boolean ignoreChanges)abstract ghidra.app.merge.MergeManagerProvidercreateProvider()Creates the provider that will be displayed in the merge tool.protected voiddispose()Tells a plugin that it is no longer needed.voiddomainObjectChanged(DomainObjectChangedEvent ev)Method called when a change is made to the domain object.UndoableDomainObject[]getAllOpenDomainObjects()static java.lang.StringgetCategory()UndoableDomainObjectgetCurrentDomainObject()static java.lang.StringgetDescription()static java.lang.StringgetDescriptiveName()intgetSearchPriority(UndoableDomainObject domainObject)booleanisVisible(UndoableDomainObject domainObject)ProgramopenDomainObject(DomainFile domainFile)ProgramopenDomainObject(DomainFile df, int version)ProgramopenDomainObject(DomainFile domainFile, int version, int state)voidopenDomainObject(UndoableDomainObject domainObject)voidopenDomainObject(UndoableDomainObject domainObject, boolean current)voidopenDomainObject(UndoableDomainObject domainObject, int state)abstract voidprocessEvent(PluginEvent event)Method called to process a plugin event.voidreleaseDomainObject(UndoableDomainObject domainObject, java.lang.Object persistentOwner)voidsetCurrentDomainObject(UndoableDomainObject domainObject)booleansetPersistentOwner(UndoableDomainObject domainObject, java.lang.Object owner)voidsetSearchPriority(UndoableDomainObject domainObject, int priority)-
Methods inherited from class ghidra.framework.plugintool.Plugin
acceptData, canCloseDomainObject, cleanup, close, dataStateRestoreCompleted, dependsUpon, deregisterService, equals, eventSent, firePluginEvent, getData, getMissingRequiredServices, getName, getPluginDescription, getPluginName, getServicesRequired, getSupportedDataTypes, getTool, getTransientState, getUndoRedoState, hashCode, hasMissingRequiredService, hasUnsaveData, init, isDisposed, prepareToSave, readConfigState, readDataState, registerDynamicEventConsumed, registerDynamicServiceProvided, registerEventConsumed, registerEventProduced, registerServiceProvided, registerServiceUsed, restoreTransientState, restoreUndoRedoState, saveData, serviceAdded, serviceRemoved, writeConfigState, writeDataState
-
-
-
-
Field Detail
-
mergeManager
protected MergeManager mergeManager
-
provider
protected ghidra.app.merge.MergeManagerProvider provider
-
currentDomainObject
protected UndoableDomainObject currentDomainObject
-
-
Constructor Detail
-
MergeManagerPlugin
public MergeManagerPlugin(PluginTool tool, MergeManager mergeManager, UndoableDomainObject domainObject)
Constructor for plugin that handles multi-user merge of programs.- Parameters:
tool- the tool with the active program to be mergedmergeManager- the merge manager that will control the merge processprogram- the current program
-
-
Method Detail
-
createProvider
public abstract ghidra.app.merge.MergeManagerProvider createProvider()
Creates the provider that will be displayed in the merge tool. This shows the merge progress to the user and lets the user resolve conflicts. Any class that extends this plugin must provide its own MergeManagerProvider here that will be shown to the user for the merge.- Returns:
- the merge provider associated with this plugin.
-
processEvent
public abstract void processEvent(PluginEvent event)
Description copied from class:PluginMethod called to process a plugin event. Plugins should override this method if the plugin processes PluginEvents;- Overrides:
processEventin classPlugin- Parameters:
event- plugin to process
-
dispose
protected void dispose()
Description copied from class:PluginTells a plugin that it is no longer needed. The plugin should release any resources that it has. All actions, components, services will automatically be cleaned up.
-
getDescription
public static java.lang.String getDescription()
-
getDescriptiveName
public static java.lang.String getDescriptiveName()
-
getCategory
public static java.lang.String getCategory()
-
canClose
protected boolean canClose()
Description copied from class:PluginCalled to force this plugin to terminate any tasks it has running and apply any unsaved data to domain objects or files. If it can't do this or the user cancels then this returns false.
-
domainObjectChanged
public void domainObjectChanged(DomainObjectChangedEvent ev)
Description copied from interface:DomainObjectListenerMethod called when a change is made to the domain object.- Specified by:
domainObjectChangedin interfaceDomainObjectListener- Parameters:
ev- event containing the change record and type of change that was made
-
closeAllDomainObjects
public boolean closeAllDomainObjects(boolean ignoreChanges)
-
closeDomainObject
public boolean closeDomainObject()
-
closeDomainObject
public boolean closeDomainObject(UndoableDomainObject domainObject, boolean ignoreChanges)
-
getAllOpenDomainObjects
public UndoableDomainObject[] getAllOpenDomainObjects()
-
getCurrentDomainObject
public UndoableDomainObject getCurrentDomainObject()
-
getSearchPriority
public int getSearchPriority(UndoableDomainObject domainObject)
-
isVisible
public boolean isVisible(UndoableDomainObject domainObject)
-
openDomainObject
public Program openDomainObject(DomainFile domainFile)
-
openDomainObject
public Program openDomainObject(DomainFile df, int version)
-
openDomainObject
public Program openDomainObject(DomainFile domainFile, int version, int state)
-
openDomainObject
public void openDomainObject(UndoableDomainObject domainObject)
-
openDomainObject
public void openDomainObject(UndoableDomainObject domainObject, boolean current)
-
openDomainObject
public void openDomainObject(UndoableDomainObject domainObject, int state)
-
releaseDomainObject
public void releaseDomainObject(UndoableDomainObject domainObject, java.lang.Object persistentOwner)
-
setCurrentDomainObject
public void setCurrentDomainObject(UndoableDomainObject domainObject)
-
setPersistentOwner
public boolean setPersistentOwner(UndoableDomainObject domainObject, java.lang.Object owner)
-
setSearchPriority
public void setSearchPriority(UndoableDomainObject domainObject, int priority)
-
-