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.
  • 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.
    • getAnchor

      public String getAnchor()
      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.