Class FrontEndTool

All Implemented Interfaces:
Tool, OptionsChangeListener, ServiceProvider
Direct Known Subclasses:
TestFrontEndTool

public class FrontEndTool extends PluginTool implements OptionsChangeListener
Tool that serves as the the Ghidra Project Window. Only those plugins that implement the FrontEndable interface may be directly added to this tool by the user. Other plugins that are not marked as FrontEndable may get pulled in because the FrontEndable plugins depend on them. These plugins are aware of what tool they live in so that they can behave in the appropriate manner.
  • Field Details

  • Constructor Details

    • FrontEndTool

      public FrontEndTool(ProjectManager pm)
      Construct a new Ghidra Project Window.
      Parameters:
      pm - project manager
  • Method Details

    • dispose

      public void dispose()
      Overrides:
      dispose in class PluginTool
    • shutdown

      protected void shutdown()
    • accept

      public boolean accept(URL url)
      Description copied from class: PluginTool
      Request tool to accept specified URL. Acceptance of URL depends greatly on the plugins configured into tool. If no plugin accepts URL it will be rejected and false returned. If a plugin can accept the specified URL it will attempt to process and return true if successful. The user may be prompted if connecting to the URL requires user authentication.
      Overrides:
      accept in class PluginTool
      Parameters:
      url - read-only resource URL
      Returns:
      true if URL accepted and processed else false
    • createPluginsConfigurations

      protected PluginsConfiguration createPluginsConfigurations()
      Overrides:
      createPluginsConfigurations in class PluginTool
    • selectFiles

      public void selectFiles(Set<DomainFile> files)
    • doSaveTool

      protected boolean doSaveTool()
      Description copied from class: PluginTool
      Called when it is time to save the tool. Handles auto-saving logic.
      Overrides:
      doSaveTool in class PluginTool
      Returns:
      true if a save happened
    • getDefaultLaunchMode

      public DefaultLaunchMode getDefaultLaunchMode()
      Get the preferred default tool launch mode
      Returns:
      default tool launch mode
    • optionsChanged

      public void optionsChanged(ToolOptions options, String optionName, Object oldValue, Object newValue)
      Description copied from interface: OptionsChangeListener
      Notification that an option changed.

      Note: to reject an options change, you can throw a OptionsVetoException.

      Specified by:
      optionsChanged in interface OptionsChangeListener
      Parameters:
      options - options object containing the property that changed
      optionName - name of option that changed
      oldValue - old value of the option
      newValue - new value of the option
    • canClose

      protected boolean canClose()
      Overrides:
      canClose in class PluginTool
    • setActiveProject

      public void setActiveProject(Project project)
      Set the active project.
      Parameters:
      project - may be null if there is no active project
    • shouldRestorePreviousProject

      public boolean shouldRestorePreviousProject()
      Checks to see if the previous project should be restored
      Returns:
      true if the previous project should be restored; otherwise, false
    • addProjectListener

      public void addProjectListener(ProjectListener l)
      Add the given project listener.
      Parameters:
      l - listener to add
    • removeProjectListener

      public void removeProjectListener(ProjectListener l)
      Remove the given project listener.
      Parameters:
      l - listener to remove
    • checkIn

      public void checkIn(PluginTool tool, DomainFile domainFile)
      Check in the given domain file.
      Parameters:
      tool - tool that has the domain file opened
      domainFile - domain file to check in
    • checkIn

      public void checkIn(PluginTool tool, List<DomainFile> fileList, Component parent)
      Check in the list of domain files.
      Parameters:
      tool - tool that has the domain files opened
      fileList - list of DomainFile objects
      parent - parent of dialog if an error occurs during checkin
    • merge

      public void merge(PluginTool tool, DomainFile domainFile, TaskListener taskListener)
      Merge the latest version in the repository with the given checked out domain file. Upon completion of the merge, the domain file appears as though the latest version was checked out.
      Parameters:
      tool - tool that has the domain file opened
      domainFile - domain file where latest version will be merged into
      taskListener - listener that is notified when the merge task completes
    • merge

      public void merge(PluginTool tool, List<DomainFile> fileList, TaskListener taskListener)
      Merge the latest version (in the repository) of each checked out file in fileList. Upon completion of the merge, the domain file appears as though the latest version was checked out.
      Parameters:
      tool - tool that has the domain files opened
      fileList - list of files that are checked out and are to be merged
      taskListener - listener that is notified when the merge task completes
    • setVisible

      public void setVisible(boolean visibility)
      Description copied from interface: Tool
      Sets the tool visible or invisible. This method is used by the Project to make it's tools visible or invisible depending on whether this tool is in is the active workspace.
      Specified by:
      setVisible in interface Tool
      Overrides:
      setVisible in class AbstractDockingTool
      Parameters:
      visibility - true specifies that the tool should be visible
    • setBusy

      public void setBusy(boolean busy)
    • getToolTemplate

      public ToolTemplate getToolTemplate(boolean includeConfigState)
      Overrides:
      getToolTemplate in class PluginTool
    • canCloseDomainFile

      public boolean canCloseDomainFile(DomainFile df)
      Overrides:
      canCloseDomainFile in class PluginTool