Package ghidra.app.services
Interface GraphDisplayBroker
public interface GraphDisplayBroker
Ghidra 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
Modifier and TypeMethodDescriptionvoid
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 changesgetDefaultGraphDisplay
(boolean reuseGraph, TaskMonitor monitor) A convenience method for getting aGraphDisplay
from the currently active provider.Gets the currently active GraphDisplayProvider that will be used to display/export graphsGets theGraphDisplayProvider
with the given nameReturns a list of all discoveredAttributedGraphExporter
.getGraphExporters
(String name) Returns theAttributedGraphExporter
with the given name or null in no exporter with that name is knownboolean
Checks if there is at least oneGraphDisplayProvider
in the system.void
removeGraphDisplayBrokerLisetener
(ghidra.app.plugin.core.graph.GraphDisplayBrokerListener listener) Removes the given listener
-
Method Details
-
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
A convenience method for getting aGraphDisplay
from the currently active provider. This method is intended to be used to display a new graph.- Parameters:
reuseGraph
- if true, the provider will attempt to re-use a current graph displaymonitor
- theTaskMonitor
that can be used to cancel the operation- Returns:
- a
GraphDisplay
object 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 oneGraphDisplayProvider
in the system.- Returns:
- true if there is at least one
GraphDisplayProvider
-
getGraphDisplayProvider
Gets theGraphDisplayProvider
with 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
List<AttributedGraphExporter> getGraphExporters()Returns a list of all discoveredAttributedGraphExporter
.- Returns:
- a list of all discovered
AttributedGraphExporter
.
-
getGraphExporters
Returns theAttributedGraphExporter
with the given name or null in no exporter with that name is known- Parameters:
name
- the name of the exporter to retrieve- Returns:
- the
AttributedGraphExporter
with the given name or null if no exporter with that name is known
-