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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 changesGraphDisplay
getDefaultGraphDisplay(boolean reuseGraph, TaskMonitor monitor)
A convenience method for getting aGraphDisplay
from the currently active providerGraphDisplayProvider
getDefaultGraphDisplayProvider()
Gets the currently active GraphDisplayProvider that will be used to display/export graphsGraphDisplayProvider
getGraphDisplayProvider(java.lang.String name)
Gets theGraphDisplayProvider
with the given namejava.util.List<AttributedGraphExporter>
getGraphExporters()
Returns a list of all discoveredAttributedGraphExporter
.AttributedGraphExporter
getGraphExporters(java.lang.String name)
Returns theAttributedGraphExporter
with the given name or null in no exporter with that name is knownboolean
hasDefaultGraphDisplayProvider()
Checks if there is at least oneGraphDisplayProvider
in the system.void
removeGraphDisplayBrokerLisetener(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 aGraphDisplay
from the currently active provider- 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
GraphDisplayProvider getGraphDisplayProvider(java.lang.String name)
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
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 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
-
-