Package ghidra.app.script
Class GhidraState
- java.lang.Object
- 
- ghidra.app.script.GhidraState
 
- 
 public class GhidraState extends java.lang.ObjectRepresents the current state of a Ghidra tool
- 
- 
Constructor SummaryConstructors Constructor Description GhidraState(GhidraState state)GhidraState(PluginTool tool, Project project, Program program, ProgramLocation location, ProgramSelection selection, ProgramSelection highlight)Constructs a new Ghidra state.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEnvironmentVar(java.lang.String name, byte value)voidaddEnvironmentVar(java.lang.String name, double value)voidaddEnvironmentVar(java.lang.String name, float value)voidaddEnvironmentVar(java.lang.String name, int value)voidaddEnvironmentVar(java.lang.String name, long value)voidaddEnvironmentVar(java.lang.String name, short value)voidaddEnvironmentVar(java.lang.String name, java.lang.Object value)voidaddParameter(java.lang.String key, java.lang.String label, int type, java.lang.Object defaultValue)booleandisplayParameterGatherer(java.lang.String title)AddressgetCurrentAddress()ProgramSelectiongetCurrentHighlight()ProgramLocationgetCurrentLocation()ProgramgetCurrentProgram()Returns the current program.ProgramSelectiongetCurrentSelection()java.util.Set<java.lang.String>getEnvironmentNames()java.lang.ObjectgetEnvironmentVar(java.lang.String name)GatherParamPanelgetParamPanel()ProjectgetProject()Returns the current project.PluginToolgetTool()Returns the current tool.voidremoveEnvironmentVar(java.lang.String name)voidsetCurrentAddress(Address address)If it differs, set the current location to the given address and fire aProgramLocationPluginEvent.voidsetCurrentHighlight(ProgramSelection highlight)Set the currently highlighted selection and fire aProgramHighlightPluginEvent.voidsetCurrentLocation(ProgramLocation location)If it differs, set the current location and fire aProgramLocationPluginEvent.voidsetCurrentProgram(Program program)Sets the current program.voidsetCurrentSelection(ProgramSelection selection)Set the current selection and fire aProgramSelectionPluginEvent.
 
- 
- 
- 
Constructor Detail- 
GhidraStatepublic GhidraState(PluginTool tool, Project project, Program program, ProgramLocation location, ProgramSelection selection, ProgramSelection highlight) Constructs a new Ghidra state.- Parameters:
- tool- the current tool
- project- the current project
- program- the current program
- location- the current location
- selection- the current selection
- highlight- the current highlight
 
 - 
GhidraStatepublic GhidraState(GhidraState state) 
 
- 
 - 
Method Detail- 
getToolpublic PluginTool getTool() Returns the current tool.- Returns:
- the current tool
 
 - 
getProjectpublic Project getProject() Returns the current project.- Returns:
- the current project
 
 - 
getCurrentProgrampublic Program getCurrentProgram() Returns the current program.- Returns:
- the current program
 
 - 
setCurrentProgrampublic void setCurrentProgram(Program program) Sets the current program.- Parameters:
- program- the new program object
 
 - 
getCurrentAddresspublic Address getCurrentAddress() - Returns:
- the address of the current location
 
 - 
setCurrentAddresspublic void setCurrentAddress(Address address) If it differs, set the current location to the given address and fire aProgramLocationPluginEvent.- Parameters:
- address- the address
 
 - 
getCurrentLocationpublic ProgramLocation getCurrentLocation() - Returns:
- the current location
 
 - 
setCurrentLocationpublic void setCurrentLocation(ProgramLocation location) If it differs, set the current location and fire aProgramLocationPluginEvent.- Parameters:
- location-
 
 - 
getCurrentHighlightpublic ProgramSelection getCurrentHighlight() - Returns:
- the currently highlighted selection
 
 - 
setCurrentHighlightpublic void setCurrentHighlight(ProgramSelection highlight) Set the currently highlighted selection and fire aProgramHighlightPluginEvent.- Parameters:
- highlight- the selection
 
 - 
getCurrentSelectionpublic ProgramSelection getCurrentSelection() - Returns:
- the current selection
 
 - 
setCurrentSelectionpublic void setCurrentSelection(ProgramSelection selection) Set the current selection and fire aProgramSelectionPluginEvent.- Parameters:
- selection- the selection
 
 - 
addEnvironmentVarpublic void addEnvironmentVar(java.lang.String name, byte value)
 - 
addEnvironmentVarpublic void addEnvironmentVar(java.lang.String name, short value)
 - 
addEnvironmentVarpublic void addEnvironmentVar(java.lang.String name, int value)
 - 
addEnvironmentVarpublic void addEnvironmentVar(java.lang.String name, long value)
 - 
addEnvironmentVarpublic void addEnvironmentVar(java.lang.String name, float value)
 - 
addEnvironmentVarpublic void addEnvironmentVar(java.lang.String name, double value)
 - 
addEnvironmentVarpublic void addEnvironmentVar(java.lang.String name, java.lang.Object value)
 - 
removeEnvironmentVarpublic void removeEnvironmentVar(java.lang.String name) 
 - 
getEnvironmentVarpublic java.lang.Object getEnvironmentVar(java.lang.String name) 
 - 
addParameterpublic void addParameter(java.lang.String key, java.lang.String label, int type, java.lang.Object defaultValue)
 - 
displayParameterGathererpublic boolean displayParameterGatherer(java.lang.String title) 
 - 
getParamPanelpublic GatherParamPanel getParamPanel() 
 - 
getEnvironmentNamespublic java.util.Set<java.lang.String> getEnvironmentNames() 
 
- 
 
-