Interface FunctionComparisonService
-
public interface FunctionComparisonService
Allows users to create comparisons between functions which will be displayed side-by-side in aFunctionComparisonProvider
. Each side in the display will allow the user to select one or more functionsConcurrent usage: All work performed by this service will be done on the Swing thread. Further, all calls that do not return a value will be run immediately if the caller is on the Swing thread; otherwise, the work will be done on the Swing thread at a later time. Contrastingly, any method on this interface that returns a value will be run immediately, regardless of whether the call is on the Swing thread. Thus, the methods that return a value will always be blocking calls; methods that do not return a value may or may not block, depending on the client's thread.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addFunctionComparisonProviderListener(ComponentProviderActivationListener listener)
Adds the given listener to the list of subscribers who wish to be notified of provider activation events (eg: provider open/close)ghidra.app.plugin.core.functioncompare.FunctionComparisonProvider
compareFunctions(Function source, Function target)
Creates a comparison between two functions, where the source function will be shown on the left side of the comparison dialog and the target on the right.void
compareFunctions(Function source, Function target, ghidra.app.plugin.core.functioncompare.FunctionComparisonProvider provider)
Creates a comparison between two functions and adds it to a given comparison provider.ghidra.app.plugin.core.functioncompare.FunctionComparisonProvider
compareFunctions(java.util.Set<Function> functions)
Creates a comparison between a set of functions, where each function in the list can be compared against any other.void
compareFunctions(java.util.Set<Function> functions, ghidra.app.plugin.core.functioncompare.FunctionComparisonProvider provider)
Creates a comparison between a set of functions, adding them to the given comparison provider.void
removeFunction(Function function)
Removes a given function from all comparisons across all comparison providersvoid
removeFunction(Function function, ghidra.app.plugin.core.functioncompare.FunctionComparisonProvider provider)
Removes a given function from all comparisons in the given comparison provider onlyvoid
removeFunctionComparisonProviderListener(ComponentProviderActivationListener listener)
Removes a listener from the list of provider activation event subscribers
-
-
-
Method Detail
-
compareFunctions
ghidra.app.plugin.core.functioncompare.FunctionComparisonProvider compareFunctions(java.util.Set<Function> functions)
Creates a comparison between a set of functions, where each function in the list can be compared against any other.eg: Given a set of 3 functions (f1, f2, f3), the comparison dialog will allow the user to display either f1, f2 or f3 on EITHER side of the comparison.
Note that this method will always create a new provider; if you want to add functions to an existing comparison, use
this
variant that takes a provider.- Parameters:
functions
- the functions to compare- Returns:
- the new comparison provider
-
compareFunctions
ghidra.app.plugin.core.functioncompare.FunctionComparisonProvider compareFunctions(Function source, Function target)
Creates a comparison between two functions, where the source function will be shown on the left side of the comparison dialog and the target on the right.Note that this will always create a new provider; if you want to add functions to an existing comparison, use
this
variant that takes a provider.- Parameters:
source
- a function in the comparisontarget
- a function in the comparison- Returns:
- the new comparison provider
-
compareFunctions
void compareFunctions(java.util.Set<Function> functions, ghidra.app.plugin.core.functioncompare.FunctionComparisonProvider provider)
Creates a comparison between a set of functions, adding them to the given comparison provider. Each function in the given set will be added to both sides of the comparison, allowing users to compare any functions in the existing provider with the new set.- Parameters:
functions
- the functions to compareprovider
- the provider to add the comparisons to- See Also:
compareFunctions(Set)
-
compareFunctions
void compareFunctions(Function source, Function target, ghidra.app.plugin.core.functioncompare.FunctionComparisonProvider provider)
Creates a comparison between two functions and adds it to a given comparison provider. The existing comparisons in the provider will not be affected, unless the provider already contains a comparison with the same source function; in this case the given target will be added to that comparisons' list of targets.- Parameters:
source
- a function in the comparisontarget
- a function in the comparisonprovider
- the provider to add the comparison to- See Also:
compareFunctions(Function, Function)
-
removeFunction
void removeFunction(Function function)
Removes a given function from all comparisons across all comparison providers- Parameters:
function
- the function to remove
-
removeFunction
void removeFunction(Function function, ghidra.app.plugin.core.functioncompare.FunctionComparisonProvider provider)
Removes a given function from all comparisons in the given comparison provider only- Parameters:
function
- the function to removeprovider
- the comparison provider to remove functions from
-
addFunctionComparisonProviderListener
void addFunctionComparisonProviderListener(ComponentProviderActivationListener listener)
Adds the given listener to the list of subscribers who wish to be notified of provider activation events (eg: provider open/close)- Parameters:
listener
- the listener to be added
-
removeFunctionComparisonProviderListener
void removeFunctionComparisonProviderListener(ComponentProviderActivationListener listener)
Removes a listener from the list of provider activation event subscribers- Parameters:
listener
- the listener to remove
-
-