Class ScriptInfo

java.lang.Object
ghidra.app.script.ScriptInfo

public class ScriptInfo extends Object
This class parses the meta-data about a script.
  • Field Details Link icon

    • DELIMITTER Link icon

      public static final String DELIMITTER
      The delimiter used in categories and menu paths.
      See Also:
    • METADATA Link icon

      public static final String[] METADATA
  • Method Details Link icon

    • refresh Link icon

      public void refresh()
      Setting the toolbar image to null forces it to be reloaded on the next request.
    • getName Link icon

      public String getName()
      Returns the name of the script. The name of the script is the file name.
      Returns:
      the name of the script
    • getSourceFile Link icon

      public ResourceFile getSourceFile()
      Returns the script source file.
      Returns:
      the script source file
    • getAuthor Link icon

      public String getAuthor()
      Returns the script author information.
      Returns:
      the script author information.
    • getRuntimeEnvironmentName Link icon

      public String getRuntimeEnvironmentName()
      Returns the name of the required runtime environment
      Returns:
      the name of the required runtime environment
      See Also:
    • getProvider Link icon

      public GhidraScriptProvider getProvider()
      Returns the GhidraScriptProvider currently associated with the script
      Returns:
      The GhidraScriptProvider currently associated with the script
    • isCompileErrors Link icon

      public boolean isCompileErrors()
      Returns true if the script has compile errors.
      Returns:
      true if the script has compile errors
    • setCompileErrors Link icon

      public void setCompileErrors(boolean b)
      Sets whether the script has compile errors.
      Parameters:
      b - true if the script has compile errors
    • isDuplicate Link icon

      public boolean isDuplicate()
      Returns true if this script is a duplicate. When two or more scripts exists with the same name, this is considered a duplicate script.
      Returns:
      true if this script is a duplicate
    • setDuplicate Link icon

      public void setDuplicate(boolean isDuplicate)
      Sets whether the script is a duplicate.
      Parameters:
      isDuplicate - true if the script is a duplicate
    • hasUnsupportedProvider Link icon

      public boolean hasUnsupportedProvider()
      Returns true if this script has an UnsupportedScriptProvider. This will typically happen when a script defines a wrong AT_RUNTIME tag.
      Returns:
      True if this script has an UnsupportedScriptProvider; otherwise, false
    • getDescription Link icon

      public String getDescription()
      Returns the script description.
      Returns:
      the script description
    • isCategory Link icon

      public boolean isCategory(String[] otherCategory)
      Returns true if 'cat' is a category.
      Parameters:
      otherCategory - the script category
      Returns:
      true if 'cat' is a category
    • getCategory Link icon

      public String[] getCategory()
      Returns the script category path.
      Returns:
      the script category path
    • getMenuPath Link icon

      public String[] getMenuPath()
      Returns the script menu path.
      Returns:
      the script menu path
    • getMenuPathAsString Link icon

      public String getMenuPathAsString()
      Returns the script menu path as a string. For example,"Path1->Path2->Path3".
      Returns:
      the script menu path as a string
    • getKeyBinding Link icon

      public KeyStroke getKeyBinding()
      Returns the script key binding.
      Returns:
      the script key binding
    • getKeyBindingErrorMessage Link icon

      public String getKeyBindingErrorMessage()
      Returns:
      an error resulting from parsing keybinding metadata
    • getToolBarImage Link icon

      public Icon getToolBarImage(boolean scaled)
      Returns the script tool bar icon.
      Parameters:
      scaled - true if the icon should be scaled to 16x16.
      Returns:
      the script tool bar icon
    • getImportPackage Link icon

      public String getImportPackage()
      Returns the script imports
      Returns:
      the script imports
    • getToolTipText Link icon

      public String getToolTipText()
      Returns a string designed to be used as a tool tip for describing this script
      Returns:
      a string designed to be used as a tool tip
    • hasErrors Link icon

      public boolean hasErrors()
      Returns:
      true if the script either has compiler errors, or is a duplicate
    • getErrorMessage Link icon

      public String getErrorMessage()
      Returns:
      a generic error message
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object