Package ghidra.test

Class AbstractGhidraHeadedIntegrationTest

    • Constructor Detail

      • AbstractGhidraHeadedIntegrationTest

        public AbstractGhidraHeadedIntegrationTest()
    • Method Detail

      • 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,
                                                     java.lang.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,
                                             java.lang.String pluginName)
      • 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
      • 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.CodeBrowserPlugin 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.CodeBrowserPlugin codeBrowser,
                          int clickCount,
                          boolean wait)
      • click

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