Interface TraceRmiLaunchOpinion

All Superinterfaces:
ExtensionPoint

public interface TraceRmiLaunchOpinion extends ExtensionPoint
A factory of launch offers

Each opinion is instantiated only once for the entire application, even when multiple tools are open.

  • Method Summary

    Modifier and Type
    Method
    Description
    getOffers(ghidra.app.plugin.core.debug.gui.tracermi.launcher.TraceRmiLauncherServicePlugin plugin, Program program)
    Generate or retrieve a collection of offers based on the current program.
    default void
    Register any options
    default boolean
    requiresRefresh(String optionName)
    Check if a change in the given option requires a refresh of offers
  • Method Details

    • registerOptions

      default void registerOptions(Options options)
      Register any options
      Parameters:
      options - the tool options
    • requiresRefresh

      default boolean requiresRefresh(String optionName)
      Check if a change in the given option requires a refresh of offers
      Parameters:
      optionName - the name of the option that changed
      Returns:
      true to refresh, false otherwise
    • getOffers

      Collection<TraceRmiLaunchOffer> getOffers(ghidra.app.plugin.core.debug.gui.tracermi.launcher.TraceRmiLauncherServicePlugin plugin, Program program)
      Generate or retrieve a collection of offers based on the current program.

      Take care trying to "validate" a particular mechanism. For example, it is not appropriate to check that GDB exists, nor to execute it to derive its version.

      1. It's possible the user has dependencies installed in non-standard locations. I.e., the user needs a chance to configure things before the UI decides whether or not to display them.
      2. The menus are meant to display all possibilities installed in Ghidra, even if some dependencies are missing on the local system. Discovery of the feature is most important. Knowing a feature exists may motivate a user to obtain the required dependencies and try it out.
      3. An offer is only promoted to the quick-launch menu upon successful connection. I.e., the entries there are already validated; they've worked at least once before.
      Parameters:
      plugin - the Trace RMI launcher service plugin. NOTE: to get access to the Trace RMI (connection) service, use the InternalTraceRmiService, so that the offers can register the connection's resources. See TraceRmiHandler.registerTerminals(Collection). Terminal registration is required for the Disconnect button to completely terminate the back end.
      program - the current program. While this is not always used by the launcher, it is implied that the user expects the debugger to do something with the current program, even if it's just informing the back-end debugger of the target image.
      Returns:
      the offers. The order is ignored, since items are displayed alphabetically.