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 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

      GraphDisplay getDefaultGraphDisplay(boolean reuseGraph, TaskMonitor monitor) throws GraphException
      A convenience method for getting a GraphDisplay 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 display
      monitor - the TaskMonitor 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 one GraphDisplayProvider in the system.
      Returns:
      true if there is at least one GraphDisplayProvider
    • getGraphDisplayProvider

      GraphDisplayProvider getGraphDisplayProvider(String name)
      Gets the GraphDisplayProvider 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 discovered AttributedGraphExporter.
      Returns:
      a list of all discovered AttributedGraphExporter.
    • getGraphExporters

      AttributedGraphExporter getGraphExporters(String name)
      Returns the AttributedGraphExporter 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