Package ghidra.util
Class HelpLocation
java.lang.Object
ghidra.util.HelpLocation
Class to identify where help can be located for some object. Help can be
set on actions or dialogs.
-
Field Summary
Modifier and TypeFieldDescriptionstatic 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
ConstructorDescriptionHelpLocation
(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 TypeMethodDescriptionboolean
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.getTopic()
Returns the topic name/path if known, otherwise null.int
hashCode()
toString()
-
Field Details
-
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
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
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 nameanchor
- anchor name or null
-
HelpLocation
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 nameanchor
- anchor name or nullinceptionInformation
- the description of from whence the item described by this location has come; can be null
-
-
Method Details
-
getHelpId
Get the help ID for this help location.- Returns:
- null if there is a Help URL instead of a help ID
-
getTopic
Returns the topic name/path if known, otherwise null.- Returns:
- the topic name/path if known, otherwise null.
-
getAnchor
Returns the topic anchor name if known, otherwise null.- Returns:
- the topic anchor name if known, otherwise null.
-
getHelpURL
Get the help URL for this help location. A URL is created when the constructorHelpLocation(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
-
hashCode
public int hashCode() -
equals
-
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.
-