Package ghidra.app.script
Class ScriptInfo
java.lang.Object
ghidra.app.script.ScriptInfo
This class parses the meta-data about a script.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the script author information.String[]Returns the script category path.Returns the script description.Returns the script importsReturns the script key binding.String[]Returns the script menu path.Returns the script menu path as a string.getName()Returns the name of the script.Returns theGhidraScriptProvidercurrently associated with the scriptReturns the name of the required runtime environmentReturns the script source file.getToolBarImage(boolean scaled) Returns the script tool bar icon.Returns a string designed to be used as a tool tip for describing this scriptbooleanbooleanReturns true if this script has anUnsupportedScriptProvider.booleanisCategory(String[] otherCategory) Returns true if 'cat' is a category.booleanReturns true if the script has compile errors.booleanReturns true if this script is a duplicate.voidrefresh()Setting the toolbar image to null forces it to be reloaded on the next request.voidsetCompileErrors(boolean b) Sets whether the script has compile errors.voidsetDuplicate(boolean isDuplicate) Sets whether the script is a duplicate.toString()
-
Field Details
-
DELIMITTER
The delimiter used in categories and menu paths.- See Also:
-
METADATA
-
-
Method Details
-
refresh
public void refresh()Setting the toolbar image to null forces it to be reloaded on the next request. -
getName
Returns the name of the script. The name of the script is the file name.- Returns:
- the name of the script
-
getSourceFile
Returns the script source file.- Returns:
- the script source file
-
getAuthor
Returns the script author information.- Returns:
- the script author information.
-
getRuntimeEnvironmentName
Returns the name of the required runtime environment- Returns:
- the name of the required runtime environment
- See Also:
-
getProvider
Returns theGhidraScriptProvidercurrently associated with the script- Returns:
- The
GhidraScriptProvidercurrently associated with the script
-
isCompileErrors
public boolean isCompileErrors()Returns true if the script has compile errors.- Returns:
- true if the script has compile errors
-
setCompileErrors
public void setCompileErrors(boolean b) Sets whether the script has compile errors.- Parameters:
b- true if the script has compile errors
-
isDuplicate
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
public void setDuplicate(boolean isDuplicate) Sets whether the script is a duplicate.- Parameters:
isDuplicate- true if the script is a duplicate
-
hasUnsupportedProvider
public boolean hasUnsupportedProvider()Returns true if this script has anUnsupportedScriptProvider. This will typically happen when a script defines a wrongAT_RUNTIMEtag.- Returns:
- True if this script has an
UnsupportedScriptProvider; otherwise, false
-
getDescription
Returns the script description.- Returns:
- the script description
-
isCategory
Returns true if 'cat' is a category.- Parameters:
otherCategory- the script category- Returns:
- true if 'cat' is a category
-
getCategory
Returns the script category path.- Returns:
- the script category path
-
getMenuPath
Returns the script menu path.- Returns:
- the script menu path
-
getMenuPathAsString
Returns the script menu path as a string. For example,"Path1->Path2->Path3".- Returns:
- the script menu path as a string
-
getKeyBinding
Returns the script key binding.- Returns:
- the script key binding
-
getKeyBindingErrorMessage
- Returns:
- an error resulting from parsing keybinding metadata
-
getToolBarImage
Returns the script tool bar icon.- Parameters:
scaled- true if the icon should be scaled to 16x16.- Returns:
- the script tool bar icon
-
getImportPackage
Returns the script imports- Returns:
- the script imports
-
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
public boolean hasErrors()- Returns:
- true if the script either has compiler errors, or is a duplicate
-
getErrorMessage
- Returns:
- a generic error message
-
toString
-