Package ghidra.test

Class AbstractGhidraHeadedIntegrationTest

Direct Known Subclasses:
AbstractProgramBasedTest, AbstractScreenShotGenerator

public abstract class AbstractGhidraHeadedIntegrationTest extends AbstractGhidraHeadlessIntegrationTest
  • Constructor Details

    • AbstractGhidraHeadedIntegrationTest

      public AbstractGhidraHeadedIntegrationTest()
  • Method Details

    • createApplicationLayout

      protected ApplicationLayout createApplicationLayout() throws IOException
      Overrides:
      createApplicationLayout in class AbstractGhidraHeadlessIntegrationTest
      Throws:
      IOException
    • createApplicationConfiguration

      protected ApplicationConfiguration createApplicationConfiguration()
      Overrides:
      createApplicationConfiguration in class AbstractGhidraHeadlessIntegrationTest
    • waitForProgram

      public static void waitForProgram(Program program)
      Flushes the given program's events before waiting for the swing update manager
      Parameters:
      program - The program whose events will be flushed; may be null
    • addPlugin

      public static <T extends Plugin> T addPlugin(PluginTool tool, Class<T> c) throws PluginException
      Adds the given plugin to the tool and then returns the instance of the plugin that was added
      Parameters:
      tool - the tool
      c - the class of the plugin to add
      Returns:
      the newly added plugin
      Throws:
      PluginException - if the plugin could not be constructed, or there was problem executing its init() method, or if a plugin of this class already exists in the tool
    • getPluginByName

      public static Plugin getPluginByName(PluginTool tool, String pluginName)
    • showTool

      public static PluginTool showTool(PluginTool tool)
    • showDialogWithoutBlocking

      public static DialogComponentProvider showDialogWithoutBlocking(PluginTool tool, DialogComponentProvider provider)
      Shows the given DialogComponentProvider using the given tool's AbstractDockingTool.showDialog(DialogComponentProvider) method.
      Parameters:
      tool - The tool used to show the given provider.
      provider - The DialogComponentProvider to show.
      Returns:
      The provider once it has been shown, or null if the provider is not shown within the given maximum wait time.
    • waitForBusyTool

      public static void waitForBusyTool(PluginTool tool)
      Waits for the tool to finish executing commands and tasks
      Parameters:
      tool - the tool
      Throws:
      junit.framework.AssertionFailedError - if the tool does not finish work within a reasonable limit
    • getAction

      public static DockingActionIf getAction(Plugin plugin, String actionName)
    • saveTool

      public static PluginTool saveTool(Project project, PluginTool tool)
      Save the given tool to the project tool chest. If the tool already exists, then it will be overwritten with the given tool.
      Parameters:
      project - The project which with the tool is associated.
      tool - The tool to be saved
      Returns:
      the new tool
    • click

      public void click(ghidra.app.plugin.core.codebrowser.AbstractCodeBrowserPlugin<?> codeBrowser, int clickCount)
      Triggers a browser click at the current cursor location. Thus, this method should be called only after the browser location is set the the desired field.
      Parameters:
      codeBrowser - the CodeBrowserPlugin
      clickCount - the click count
    • click

      public void click(ghidra.app.plugin.core.codebrowser.AbstractCodeBrowserPlugin<?> codeBrowser, int clickCount, boolean wait)
    • click

      protected void click(FieldPanel fp, int clickCount, boolean wait)
    • click

      protected void click(FieldPanel fp, Point p, int clickCount, boolean wait)