Package ghidra.app.services
Interface GraphDisplayBroker
-
public interface GraphDisplayBrokerGhidra service interface for managing and directing graph output. It purpose is to discover available graphing display providers and (if more than one) allow the user to select the currently active graph consumer. Clients that generate graphs don't have to worry about how to display them or export graphs. They simply send their graphs to the broker and register for graph events if they want interactive support.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddGraphDisplayBrokerListener(ghidra.app.plugin.core.graph.GraphDisplayBrokerListener listener)Adds a listener for notification when the set of graph display providers change or the currently active graph display provider changesGraphDisplaygetDefaultGraphDisplay(boolean reuseGraph, TaskMonitor monitor)A convenience method for getting aGraphDisplayfrom the currently active providerGraphDisplayProvidergetDefaultGraphDisplayProvider()Gets the currently active GraphDisplayProvider that will be used to display/export graphsGraphDisplayProvidergetGraphDisplayProvider(java.lang.String name)Gets theGraphDisplayProviderwith the given namejava.util.List<AttributedGraphExporter>getGraphExporters()Returns a list of all discoveredAttributedGraphExporter.AttributedGraphExportergetGraphExporters(java.lang.String name)Returns theAttributedGraphExporterwith the given name or null in no exporter with that name is knownbooleanhasDefaultGraphDisplayProvider()Checks if there is at least oneGraphDisplayProviderin the system.voidremoveGraphDisplayBrokerLisetener(ghidra.app.plugin.core.graph.GraphDisplayBrokerListener listener)Removes the given listener
-
-
-
Method Detail
-
getDefaultGraphDisplayProvider
GraphDisplayProvider getDefaultGraphDisplayProvider()
Gets the currently active GraphDisplayProvider that will be used to display/export graphs- Returns:
- the currently active GraphDisplayProvider
-
addGraphDisplayBrokerListener
void addGraphDisplayBrokerListener(ghidra.app.plugin.core.graph.GraphDisplayBrokerListener listener)
Adds a listener for notification when the set of graph display providers change or the currently active graph display provider changes- Parameters:
listener- the listener to be notified
-
removeGraphDisplayBrokerLisetener
void removeGraphDisplayBrokerLisetener(ghidra.app.plugin.core.graph.GraphDisplayBrokerListener listener)
Removes the given listener- Parameters:
listener- the listener to no longer be notified of changes
-
getDefaultGraphDisplay
GraphDisplay getDefaultGraphDisplay(boolean reuseGraph, TaskMonitor monitor) throws GraphException
A convenience method for getting aGraphDisplayfrom the currently active provider- Parameters:
reuseGraph- if true, the provider will attempt to re-use a current graph displaymonitor- theTaskMonitorthat can be used to cancel the operation- Returns:
- a
GraphDisplayobject to sends graphs to be displayed or exported. - Throws:
GraphException- thrown if an error occurs trying to get a graph display
-
hasDefaultGraphDisplayProvider
boolean hasDefaultGraphDisplayProvider()
Checks if there is at least oneGraphDisplayProviderin the system.- Returns:
- true if there is at least one
GraphDisplayProvider
-
getGraphDisplayProvider
GraphDisplayProvider getGraphDisplayProvider(java.lang.String name)
Gets theGraphDisplayProviderwith the given name- Parameters:
name- the name of the GraphDisplayProvider to get- Returns:
- the GraphDisplayProvider with the given name or null if none with that name exists.
-
getGraphExporters
java.util.List<AttributedGraphExporter> getGraphExporters()
Returns a list of all discoveredAttributedGraphExporter.- Returns:
- a list of all discovered
AttributedGraphExporter.
-
getGraphExporters
AttributedGraphExporter getGraphExporters(java.lang.String name)
Returns theAttributedGraphExporterwith the given name or null in no exporter with that name is known- Parameters:
name- the name of the exporter to retrieve- Returns:
- the
AttributedGraphExporterwith the given name or null if no exporter with that name is known
-
-