Package ghidra.feature.vt.gui.plugin
Class VTControllerImpl
java.lang.Object
ghidra.feature.vt.gui.plugin.VTControllerImpl
- All Implemented Interfaces:
VTController
,VTSessionSupplier
,ghidra.framework.model.DomainObjectListener
,ghidra.framework.model.TransactionListener
,ghidra.framework.options.OptionsChangeListener
,EventListener
public class VTControllerImpl
extends Object
implements ghidra.framework.model.DomainObjectListener, ghidra.framework.options.OptionsChangeListener, ghidra.framework.model.TransactionListener, VTController
-
Field Summary
Fields inherited from interface ghidra.feature.vt.gui.plugin.VTController
VERSION_TRACKING_OPTIONS_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(VTControllerListener listener) boolean
void
boolean
void
dispose()
void
domainObjectChanged
(ghidra.framework.model.DomainObjectChangedEvent ev) ghidra.program.util.AddressCorrelation
getCorrelator
(ghidra.program.model.listing.Data source, ghidra.program.model.listing.Data destination) ghidra.program.util.AddressCorrelation
getCorrelator
(ghidra.program.model.listing.Function source, ghidra.program.model.listing.Function destination) getCurrentMarkupForLocation
(ghidra.program.util.ProgramLocation location, ghidra.program.model.listing.Program program) ghidra.app.plugin.core.colorizer.ColorizingService
ghidra.program.model.listing.Program
ghidra.program.model.symbol.Symbol
getDestinationSymbol
(VTAssociation association) getMarkupItems
(docking.ActionContext context) getMatchInfo
(VTMatch match) ghidra.framework.options.ToolOptions
ghidra.program.model.address.AddressSetView
Gets the address set for the current selection in the Destination Tool.ghidra.program.model.address.AddressSetView
Gets the address set for the current selection in the Source Tool.ghidra.framework.plugintool.ServiceProvider
ghidra.app.plugin.core.colorizer.ColorizingService
ghidra.program.model.listing.Program
ghidra.program.model.symbol.Symbol
getSourceSymbol
(VTAssociation association) ghidra.framework.plugintool.PluginTool
getTool()
void
gotoDestinationLocation
(ghidra.program.util.ProgramLocation location) void
gotoSourceLocation
(ghidra.program.util.ProgramLocation location) void
void
openVersionTrackingSession
(VTSession newSession) boolean
openVersionTrackingSession
(ghidra.framework.model.DomainFile domainFile) void
optionsChanged
(ghidra.framework.options.ToolOptions options, String optionName, Object oldValue, Object newValue) void
readConfigState
(ghidra.framework.options.SaveState saveState) void
refresh()
void
removeListener
(VTControllerListener listener) void
Runs VT tasks, listening for destination program changes and updates undo/redo state accordingly.void
setSelectedMarkupItem
(VTMarkupItem markupItem) void
setSelectedMatch
(VTMatch match) void
setSelectionInDestinationTool
(ghidra.program.model.address.AddressSetView destinationSet) Sets the selection in the destination tool to the given address set.void
setSelectionInSourceTool
(ghidra.program.model.address.AddressSetView sourceSet) Sets the selection in the source tool to the given address set.void
transactionEnded
(ghidra.framework.data.DomainObjectAdapterDB domainObj) void
transactionStarted
(ghidra.framework.data.DomainObjectAdapterDB domainObj, ghidra.framework.model.TransactionInfo tx) void
undoRedoOccurred
(ghidra.framework.data.DomainObjectAdapterDB domainObj) void
undoStackChanged
(ghidra.framework.data.DomainObjectAdapterDB domainObj) void
writeConfigState
(ghidra.framework.options.SaveState saveState)
-
Constructor Details
-
VTControllerImpl
-
-
Method Details
-
addListener
- Specified by:
addListener
in interfaceVTController
-
removeListener
- Specified by:
removeListener
in interfaceVTController
-
getSession
- Specified by:
getSession
in interfaceVTController
- Specified by:
getSession
in interfaceVTSessionSupplier
-
openVersionTrackingSession
public boolean openVersionTrackingSession(ghidra.framework.model.DomainFile domainFile) - Specified by:
openVersionTrackingSession
in interfaceVTController
-
openVersionTrackingSession
- Specified by:
openVersionTrackingSession
in interfaceVTController
-
closeVersionTrackingSession
public boolean closeVersionTrackingSession()- Specified by:
closeVersionTrackingSession
in interfaceVTController
-
closeCurrentSessionIgnoringChanges
public void closeCurrentSessionIgnoringChanges()- Specified by:
closeCurrentSessionIgnoringChanges
in interfaceVTController
-
dispose
public void dispose()- Specified by:
dispose
in interfaceVTController
-
readConfigState
public void readConfigState(ghidra.framework.options.SaveState saveState) - Specified by:
readConfigState
in interfaceVTController
-
writeConfigState
public void writeConfigState(ghidra.framework.options.SaveState saveState) - Specified by:
writeConfigState
in interfaceVTController
-
getSourceProgram
public ghidra.program.model.listing.Program getSourceProgram()- Specified by:
getSourceProgram
in interfaceVTController
-
getDestinationProgram
public ghidra.program.model.listing.Program getDestinationProgram()- Specified by:
getDestinationProgram
in interfaceVTController
-
checkForUnSavedChanges
public boolean checkForUnSavedChanges()- Specified by:
checkForUnSavedChanges
in interfaceVTController
-
getCorrelator
public ghidra.program.util.AddressCorrelation getCorrelator(ghidra.program.model.listing.Function source, ghidra.program.model.listing.Function destination) - Specified by:
getCorrelator
in interfaceVTController
-
getCorrelator
public ghidra.program.util.AddressCorrelation getCorrelator(ghidra.program.model.listing.Data source, ghidra.program.model.listing.Data destination) - Specified by:
getCorrelator
in interfaceVTController
-
getCurrentMarkupForLocation
public VTMarkupItem getCurrentMarkupForLocation(ghidra.program.util.ProgramLocation location, ghidra.program.model.listing.Program program) - Specified by:
getCurrentMarkupForLocation
in interfaceVTController
-
getMarkupItems
- Specified by:
getMarkupItems
in interfaceVTController
-
getOptions
public ghidra.framework.options.ToolOptions getOptions()- Specified by:
getOptions
in interfaceVTController
-
getParentComponent
- Specified by:
getParentComponent
in interfaceVTController
-
getServiceProvider
public ghidra.framework.plugintool.ServiceProvider getServiceProvider()- Specified by:
getServiceProvider
in interfaceVTController
-
getVersionTrackingSessionName
- Specified by:
getVersionTrackingSessionName
in interfaceVTController
-
refresh
public void refresh()- Specified by:
refresh
in interfaceVTController
-
getMatchInfo
- Specified by:
getMatchInfo
in interfaceVTController
-
getTool
public ghidra.framework.plugintool.PluginTool getTool()- Specified by:
getTool
in interfaceVTController
-
setSelectedMatch
- Specified by:
setSelectedMatch
in interfaceVTController
-
getMatchInfo
- Specified by:
getMatchInfo
in interfaceVTController
-
setSelectedMarkupItem
- Specified by:
setSelectedMarkupItem
in interfaceVTController
-
markupItemStatusChanged
- Specified by:
markupItemStatusChanged
in interfaceVTController
-
getCorrelator
- Specified by:
getCorrelator
in interfaceVTController
-
domainObjectChanged
public void domainObjectChanged(ghidra.framework.model.DomainObjectChangedEvent ev) - Specified by:
domainObjectChanged
in interfaceghidra.framework.model.DomainObjectListener
- Specified by:
domainObjectChanged
in interfaceVTController
-
optionsChanged
public void optionsChanged(ghidra.framework.options.ToolOptions options, String optionName, Object oldValue, Object newValue) - Specified by:
optionsChanged
in interfaceghidra.framework.options.OptionsChangeListener
- Specified by:
optionsChanged
in interfaceVTController
-
gotoSourceLocation
public void gotoSourceLocation(ghidra.program.util.ProgramLocation location) - Specified by:
gotoSourceLocation
in interfaceVTController
-
gotoDestinationLocation
public void gotoDestinationLocation(ghidra.program.util.ProgramLocation location) - Specified by:
gotoDestinationLocation
in interfaceVTController
-
runVTTask
Description copied from interface:VTController
Runs VT tasks, listening for destination program changes and updates undo/redo state accordingly.- Specified by:
runVTTask
in interfaceVTController
- Parameters:
task
- the task
-
getSelectionInSourceTool
public ghidra.program.model.address.AddressSetView getSelectionInSourceTool()Description copied from interface:VTController
Gets the address set for the current selection in the Source Tool.- Specified by:
getSelectionInSourceTool
in interfaceVTController
- Returns:
- the current selection or null.
-
getSelectionInDestinationTool
public ghidra.program.model.address.AddressSetView getSelectionInDestinationTool()Description copied from interface:VTController
Gets the address set for the current selection in the Destination Tool.- Specified by:
getSelectionInDestinationTool
in interfaceVTController
- Returns:
- the current selection or null.
-
setSelectionInSourceTool
public void setSelectionInSourceTool(ghidra.program.model.address.AddressSetView sourceSet) Description copied from interface:VTController
Sets the selection in the source tool to the given address set.- Specified by:
setSelectionInSourceTool
in interfaceVTController
- Parameters:
sourceSet
- the addressSet to set the source tool's selection.
-
setSelectionInDestinationTool
public void setSelectionInDestinationTool(ghidra.program.model.address.AddressSetView destinationSet) Description copied from interface:VTController
Sets the selection in the destination tool to the given address set.- Specified by:
setSelectionInDestinationTool
in interfaceVTController
- Parameters:
destinationSet
- the addressSet to set the destination tool's selection.
-
getDestinationSymbol
- Specified by:
getDestinationSymbol
in interfaceVTController
-
getSourceSymbol
- Specified by:
getSourceSymbol
in interfaceVTController
-
getSourceColorizingService
public ghidra.app.plugin.core.colorizer.ColorizingService getSourceColorizingService()- Specified by:
getSourceColorizingService
in interfaceVTController
-
getDestinationColorizingService
public ghidra.app.plugin.core.colorizer.ColorizingService getDestinationColorizingService()- Specified by:
getDestinationColorizingService
in interfaceVTController
-
transactionEnded
public void transactionEnded(ghidra.framework.data.DomainObjectAdapterDB domainObj) - Specified by:
transactionEnded
in interfaceghidra.framework.model.TransactionListener
-
transactionStarted
public void transactionStarted(ghidra.framework.data.DomainObjectAdapterDB domainObj, ghidra.framework.model.TransactionInfo tx) - Specified by:
transactionStarted
in interfaceghidra.framework.model.TransactionListener
-
undoStackChanged
public void undoStackChanged(ghidra.framework.data.DomainObjectAdapterDB domainObj) - Specified by:
undoStackChanged
in interfaceghidra.framework.model.TransactionListener
-
undoRedoOccurred
public void undoRedoOccurred(ghidra.framework.data.DomainObjectAdapterDB domainObj) - Specified by:
undoRedoOccurred
in interfaceghidra.framework.model.TransactionListener
-