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`, `EventListener`

Direct Known Subclasses:
  `DataTypeArchiveMergeManagerPlugin`, `ProgramMergeManagerPlugin`

public abstract class MergeManagerPlugin extends Plugin implements ProgramaticUseOnly, DomainObjectListener
Plugin that provides a merge component provider.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected DomainObject`
  `currentDomainObject`
  `protected MergeManager`
  `mergeManager`
  `protected ghidra.app.merge.MergeManagerProvider`
  `provider`

  ### Fields inherited from class ghidra.framework.plugintool.Plugin

  `name, pluginDescription, tool`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MergeManagerPlugin(PluginTool tool, MergeManager mergeManager, DomainObject domainObject)`
  Constructor for plugin that handles multi-user merge of programs.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected boolean`
  `canClose()`
  Called to force this plugin to terminate any tasks it has running and apply any unsaved data to domain objects or files.
  `boolean`
  `closeAllDomainObjects(boolean ignoreChanges)`
  `boolean`
  `closeDomainObject()`
  `boolean`
  `closeDomainObject(DomainObject domainObject, boolean ignoreChanges)`
  `abstract ghidra.app.merge.MergeManagerProvider`
  `createProvider()`
  Creates the provider that will be displayed in the merge tool.
  `protected void`
  `dispose()`
  Tells a plugin that it is no longer needed.
  `void`
  `domainObjectChanged(DomainObjectChangedEvent ev)`
  Method called when a change is made to the domain object.
  `DomainObject[]`
  `getAllOpenDomainObjects()`
  `static String`
  `getCategory()`
  `DomainObject`
  `getCurrentDomainObject()`
  `static String`
  `getDescription()`
  `static String`
  `getDescriptiveName()`
  `int`
  `getSearchPriority(DomainObject domainObject)`
  `boolean`
  `isVisible(DomainObject domainObject)`
  `Program`
  `openDomainObject(DomainFile domainFile)`
  `Program`
  `openDomainObject(DomainFile df, int version)`
  `Program`
  `openDomainObject(DomainFile domainFile, int version, int state)`
  `void`
  `openDomainObject(DomainObject domainObject)`
  `void`
  `openDomainObject(DomainObject domainObject, boolean current)`
  `void`
  `openDomainObject(DomainObject domainObject, int state)`
  `abstract void`
  `processEvent(PluginEvent event)`
  Method called to process a plugin event.
  `void`
  `releaseDomainObject(DomainObject domainObject, Object persistentOwner)`
  `void`
  `setCurrentDomainObject(DomainObject domainObject)`
  `boolean`
  `setPersistentOwner(DomainObject domainObject, Object owner)`
  `void`
  `setSearchPriority(DomainObject domainObject, int priority)`

  ### Methods inherited from class ghidra.framework.plugintool.Plugin

  `accept, acceptData, canCloseDomainObject, cleanup, close, dataStateRestoreCompleted, dependsUpon, deregisterService, equals, eventSent, firePluginEvent, getData, getMissingRequiredServices, getName, getPluginDescription, getServicesRequired, getSupportedDataTypes, getTool, getTransientState, getUndoRedoState, hashCode, hasMissingRequiredService, hasUnsaveData, init, internalRegisterEventConsumed, isDisposed, prepareToSave, readConfigState, readDataState, registerDynamicServiceProvided, registerServiceProvided, restoreTransientState, restoreUndoRedoState, saveData, serviceAdded, serviceRemoved, writeConfigState, writeDataState`

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

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

- ## Field Details

  - ### mergeManager

    protected MergeManager mergeManager

  - ### provider

    protected ghidra.app.merge.MergeManagerProvider provider

  - ### currentDomainObject

    protected DomainObject currentDomainObject

- ## Constructor Details

  - ### MergeManagerPlugin

    public MergeManagerPlugin(PluginTool tool, MergeManager mergeManager, DomainObject domainObject)
    Constructor for plugin that handles multi-user merge of programs.
    Parameters:
      `tool` - the tool with the active program to be merged
      `mergeManager` - the merge manager that will control the merge process
      `domainObject` - the current domain object

- ## Method Details

  - ### 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: `Plugin`
    Method called to process a plugin event. Plugins should override this method if the plugin processes PluginEvents;
    Overrides:
      `processEvent` in class `Plugin`
    Parameters:
      `event` - plugin to process

  - ### dispose

    protected void dispose()
    Description copied from class: `Plugin`
    Tells 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.
    Overrides:
      `dispose` in class `Plugin`

  - ### getDescription

    public static String getDescription()

  - ### getDescriptiveName

    public static String getDescriptiveName()

  - ### getCategory

    public static String getCategory()

  - ### canClose

    protected boolean canClose()
    Description copied from class: `Plugin`
    Called 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.
    Overrides:
      `canClose` in class `Plugin`
    Returns:
      true if this plugin can close.

  - ### domainObjectChanged

    public void domainObjectChanged(DomainObjectChangedEvent ev)
    Description copied from interface: `DomainObjectListener`
    Method called when a change is made to the domain object.
    Specified by:
      `domainObjectChanged` in interface `DomainObjectListener`
    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(DomainObject domainObject, boolean ignoreChanges)

  - ### getAllOpenDomainObjects

    public DomainObject[] getAllOpenDomainObjects()

  - ### getCurrentDomainObject

    public DomainObject getCurrentDomainObject()

  - ### getSearchPriority

    public int getSearchPriority(DomainObject domainObject)

  - ### isVisible

    public boolean isVisible(DomainObject 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(DomainObject domainObject)

  - ### openDomainObject

    public void openDomainObject(DomainObject domainObject, boolean current)

  - ### openDomainObject

    public void openDomainObject(DomainObject domainObject, int state)

  - ### releaseDomainObject

    public void releaseDomainObject(DomainObject domainObject, Object persistentOwner)

  - ### setCurrentDomainObject

    public void setCurrentDomainObject(DomainObject domainObject)

  - ### setPersistentOwner

    public boolean setPersistentOwner(DomainObject domainObject, Object owner)

  - ### setSearchPriority

    public void setSearchPriority(DomainObject domainObject, int priority)