Package ghidra.util

Class HelpLocation

java.lang.Object
ghidra.util.HelpLocation

public class HelpLocation extends Object
Class to identify where help can be located for some object. Help can be set on actions or dialogs.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    A special prefix used in the 'src' attribute if links and images to signal to the framework to locate the given resource.
    static final String
    A special prefix used in the 'src' attribute if links and images to signal to the framework to locate the given resource.
  • Constructor Summary

    Constructors
    Constructor
    Description
    HelpLocation(String topic, String anchor)
    Construct a Help location using the specified topic and anchor names.
    HelpLocation(String topic, String anchor, String inceptionInformation)
    Construct a Help location using the specified topic and anchor names.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Returns the topic anchor name if known, otherwise null.
    Get the help ID for this help location.
    Get the help URL for this help location.
    Returns information describing how/where this help location was created.
    Returns the topic name/path if known, otherwise null.
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • HELP_TOPICS

      public static final String HELP_TOPICS
      A special prefix used in the 'src' attribute if links and images to signal to the framework to locate the given resource. Using this allows cross-module help references to be relative, starting with this prefix.
      See Also:
    • HELP_SHARED

      public static final String HELP_SHARED
      A special prefix used in the 'src' attribute if links and images to signal to the framework to locate the given resource. This is meant to be used with shared help resources, such as images.
      See Also:
  • Constructor Details

    • HelpLocation

      public HelpLocation(String topic, String anchor)
      Construct a Help location using the specified topic and anchor names. An html file contained within the specified help topic directory must have an Anchor defined using the specified anchor name.

      Note: You can specify a null anchor value. In that case, the given topic will be searched for a file with the same name as the topic. If such a file exists, then that file will be used as the file for this location. If no such file exists, then the help file to use cannot be resolved. Therefore, it is best to always specify a value for the help location.

      Parameters:
      topic - topic directory name
      anchor - anchor name or null
    • HelpLocation

      public HelpLocation(String topic, String anchor, String inceptionInformation)
      Construct a Help location using the specified topic and anchor names. An html file contained within the specified help topic directory must have an Anchor defined using the specified anchor name.

      Note: You can specify a null anchor value. In that case, the given topic will be searched for a file with the same name as the topic. If such a file exists, then that file will be used as the file for this location. If no such file exists, then the help file to use cannot be resolved. Therefore, it is best to always specify a value for the help location.

      Parameters:
      topic - topic directory name
      anchor - anchor name or null
      inceptionInformation - the description of from whence the item described by this location has come; can be null
  • Method Details

    • getHelpId

      public String getHelpId()
      Get the help ID for this help location.
      Returns:
      null if there is a Help URL instead of a help ID
    • getTopic

      public String getTopic()
      Returns the topic name/path if known, otherwise null.
      Returns:
      the topic name/path if known, otherwise null.
    • getAnchor

      public String getAnchor()
      Returns the topic anchor name if known, otherwise null.
      Returns:
      the topic anchor name if known, otherwise null.
    • getHelpURL

      public URL getHelpURL()
      Get the help URL for this help location. A URL is created when the constructor HelpLocation(Class, String, String) is used by a plugin that has help relative to its class.
      Returns:
      the URL or null if a help ID is used
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getInceptionInformation

      public String getInceptionInformation()
      Returns information describing how/where this help location was created. This value may be null.
      Returns:
      information describing how/where this help location was created.