Class GoToServiceImpl

java.lang.Object
ghidra.app.util.navigation.GoToServiceImpl
All Implemented Interfaces:
GoToService

public class GoToServiceImpl extends Object implements GoToService
  • Field Details

    • plugin

      protected final Plugin plugin
  • Constructor Details

    • GoToServiceImpl

      public GoToServiceImpl(Plugin plugin, Navigatable defaultNavigatable)
  • Method Details

    • getOverrideService

      public GoToOverrideService getOverrideService()
      Specified by:
      getOverrideService in interface GoToService
    • goTo

      public boolean goTo(ProgramLocation loc)
      Description copied from interface: GoToService
      Generates a GoTo event and handles any history state that needs to be saved. This method will attempt to find the program that contains the given ProgramLocation.
      Specified by:
      goTo in interface GoToService
      Parameters:
      loc - location to go to
      Returns:
      true if the go to was successful
      See Also:
    • goTo

      public boolean goTo(ProgramLocation loc, Program program)
      Description copied from interface: GoToService
      Generates a GoTo event and handles any history state that needs to be saved. This overloaded version of GoToService.goTo(Address) uses the given program as the program within which to perform the GoTo. If the given program does not contain the given address, then the GoTo will not be performed and false will be returned. Passing null as the program parameter will cause this method to attempt to find a program that contains the given ProgramLocation.
      Specified by:
      goTo in interface GoToService
      Parameters:
      loc - location to go to
      program - the program within which to perform the GoTo
      Returns:
      true if the go to was successful
      See Also:
    • goTo

      public boolean goTo(Navigatable navigatable, ProgramLocation loc, Program program)
      Description copied from interface: GoToService
      Generates a GoTo event to the given location in the given program.
      Specified by:
      goTo in interface GoToService
      Parameters:
      navigatable - the destination navigatable
      loc - the location
      program - program
      Returns:
      true if the go to was successful
    • goTo

      public boolean goTo(Navigatable navigatable, Address goToAddress)
      Description copied from interface: GoToService
      Generates a GoTo event to the given address for the specific navigatable.
      Specified by:
      goTo in interface GoToService
      Parameters:
      navigatable - the destination navigatable
      goToAddress - the address to goto
      Returns:
      true if the go to was successful
    • goTo

      public boolean goTo(Navigatable navigatable, Program program, Address address, Address refAddress)
      Description copied from interface: GoToService
      Generates a GoTo event to the given address. The refAddress is used to determine if there is a specific symbol reference from that reference.
      Specified by:
      goTo in interface GoToService
      Parameters:
      navigatable - the destination navigatable
      program - program
      address - the destination address
      refAddress - the from reference address
      Returns:
      true if the go to was successful
    • goTo

      public boolean goTo(Address currentAddress, Address goToAddress)
      Description copied from interface: GoToService
      Generates a GoTo event to the given address. The fromAddress is used to determine if there is a specific symbol reference from the current address.
      Specified by:
      goTo in interface GoToService
      Parameters:
      currentAddress - the current address
      goToAddress - the address to goto
      Returns:
      true if the go to was successful
    • goTo

      public boolean goTo(Address goToAddress)
      Description copied from interface: GoToService
      Generates a GoTo event to the gotoAddress.
      Specified by:
      goTo in interface GoToService
      Parameters:
      goToAddress - the address to goto
      Returns:
      true if the go to was successful
      See Also:
    • goTo

      public boolean goTo(Address goToAddress, Program program)
      Description copied from interface: GoToService
      Generates a GoTo event to the gotoAddress. This overloaded version of GoToService.goTo(Address) uses the given program as the program within which to perform the GoTo. If the given program does not contain the given address, then the GoTo will not be performed and false will be returned. Passing null as the program parameter will cause this method to attempt to find a program that contains the given ProgramLocation.
      Specified by:
      goTo in interface GoToService
      Parameters:
      goToAddress - the address to goto
      program - the program within which to perform the GoTo
      Returns:
      true if the go to was successful
      See Also:
    • goToExternalLocation

      public boolean goToExternalLocation(ExternalLocation extLoc, boolean checkNavigationOption)
      Description copied from interface: GoToService
      Navigate to either the external program location or address linkage location. Specific behavior may vary based upon implementation.
      Specified by:
      goToExternalLocation in interface GoToService
      Parameters:
      extLoc - external location
      checkNavigationOption - if true the service navigation option will be used to determine if navigation to the external program will be attempted, or if navigation to the external linkage location within the current program will be attempted. If false, the implementations default behavior will be performed.
      Returns:
      true if either navigation to the external program or to a linkage location was completed successfully.
    • goToExternalLocation

      public boolean goToExternalLocation(Navigatable navigatable, ExternalLocation extLoc, boolean checkNavigationOption)
      Description copied from interface: GoToService
      Navigate to either the external program location or address linkage location. Specific behavior may vary based upon implementation.
      Specified by:
      goToExternalLocation in interface GoToService
      Parameters:
      navigatable - Navigatable
      extLoc - external location
      checkNavigationOption - if true the service navigation option will be used to determine if navigation to the external program will be attempted, or if navigation to the external linkage location within the current program will be attempted. If false, the implementations default behavior will be performed.
      Returns:
      true if either navigation to the external program or to a linkage location was completed successfully.
    • goToQuery

      public boolean goToQuery(Navigatable navigatable, Address fromAddr, QueryData queryData, GoToServiceListener listener, TaskMonitor monitor)
      Description copied from interface: GoToService
      Generates a GoTo event for the given query.

      If the query results in more than one location, a list of locations will be displayed. If the query results in only one location, then a goto event will be fired(except for a wildcard query in which case a list will still be displayed.

      The listener will be notified after query and will indicate the query status.

      Specified by:
      goToQuery in interface GoToService
      Parameters:
      navigatable - the destination for the go to event
      fromAddr - The address used to determine the scope of the query
      queryData - the query input data
      listener - the listener that will be notified when the query completes
      monitor - the task monitor
      Returns:
      true if the queryInput is found or appears to be a wildcard search
    • goToQuery

      public boolean goToQuery(Address fromAddr, QueryData queryData, GoToServiceListener listener, TaskMonitor monitor)
      Description copied from interface: GoToService
      Generates a GoTo event for the given query.

      If the query results in more than one location, a list of locations will be displayed. If the query results in only one location, then a goto event will be fired(except for a wildcard query in which case a list will still be displayed.

      The listener will be notified after query and will indicate the query status.

      Specified by:
      goToQuery in interface GoToService
      Parameters:
      fromAddr - The address used to determine the scope of the query
      queryData - the query input data
      listener - the listener that will be notified when the query completes
      monitor - the task monitor
      Returns:
      true if the queryInput is found or appears to be a wildcard search
    • setOverrideService

      public void setOverrideService(GoToOverrideService override)
      Specified by:
      setOverrideService in interface GoToService
    • getDefaultNavigatable

      public Navigatable getDefaultNavigatable()
      Description copied from interface: GoToService
      Returns the default navigatable that is the destination for GoTo events. This navigatable will not be null.
      Specified by:
      getDefaultNavigatable in interface GoToService
      Returns:
      the navigatable