Package ghidra.app.script
Class GhidraState
- java.lang.Object
-
- ghidra.app.script.GhidraState
-
public class GhidraState extends java.lang.Object
Represents the current state of a Ghidra tool
-
-
Constructor Summary
Constructors Constructor Description GhidraState(GhidraState state)
GhidraState(PluginTool tool, Project project, Program program, ProgramLocation location, ProgramSelection selection, ProgramSelection highlight)
Constructs a new Ghidra state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEnvironmentVar(java.lang.String name, byte value)
void
addEnvironmentVar(java.lang.String name, double value)
void
addEnvironmentVar(java.lang.String name, float value)
void
addEnvironmentVar(java.lang.String name, int value)
void
addEnvironmentVar(java.lang.String name, long value)
void
addEnvironmentVar(java.lang.String name, short value)
void
addEnvironmentVar(java.lang.String name, java.lang.Object value)
void
addParameter(java.lang.String key, java.lang.String label, int type, java.lang.Object defaultValue)
boolean
displayParameterGatherer(java.lang.String title)
Address
getCurrentAddress()
ProgramSelection
getCurrentHighlight()
ProgramLocation
getCurrentLocation()
Program
getCurrentProgram()
Returns the current program.ProgramSelection
getCurrentSelection()
java.util.Set<java.lang.String>
getEnvironmentNames()
java.lang.Object
getEnvironmentVar(java.lang.String name)
GatherParamPanel
getParamPanel()
Project
getProject()
Returns the current project.PluginTool
getTool()
Returns the current tool.void
removeEnvironmentVar(java.lang.String name)
void
setCurrentAddress(Address address)
void
setCurrentHighlight(ProgramSelection highlight)
void
setCurrentLocation(ProgramLocation location)
void
setCurrentProgram(Program program)
Sets the current program.void
setCurrentSelection(ProgramSelection selection)
-
-
-
Constructor Detail
-
GhidraState
public GhidraState(PluginTool tool, Project project, Program program, ProgramLocation location, ProgramSelection selection, ProgramSelection highlight)
Constructs a new Ghidra state.- Parameters:
tool
- the current toolproject
- the current projectprogram
- the current programlocation
- the current locationselection
- the current selectionhighlight
- the current highlight
-
GhidraState
public GhidraState(GhidraState state)
-
-
Method Detail
-
getTool
public PluginTool getTool()
Returns the current tool.- Returns:
- the current tool
-
getProject
public Project getProject()
Returns the current project.- Returns:
- the current project
-
getCurrentProgram
public Program getCurrentProgram()
Returns the current program.- Returns:
- the current program
-
setCurrentProgram
public void setCurrentProgram(Program program)
Sets the current program.
-
getCurrentAddress
public Address getCurrentAddress()
-
setCurrentAddress
public void setCurrentAddress(Address address)
-
getCurrentLocation
public ProgramLocation getCurrentLocation()
-
setCurrentLocation
public void setCurrentLocation(ProgramLocation location)
-
getCurrentHighlight
public ProgramSelection getCurrentHighlight()
-
setCurrentHighlight
public void setCurrentHighlight(ProgramSelection highlight)
-
getCurrentSelection
public ProgramSelection getCurrentSelection()
-
setCurrentSelection
public void setCurrentSelection(ProgramSelection selection)
-
addEnvironmentVar
public void addEnvironmentVar(java.lang.String name, byte value)
-
addEnvironmentVar
public void addEnvironmentVar(java.lang.String name, short value)
-
addEnvironmentVar
public void addEnvironmentVar(java.lang.String name, int value)
-
addEnvironmentVar
public void addEnvironmentVar(java.lang.String name, long value)
-
addEnvironmentVar
public void addEnvironmentVar(java.lang.String name, float value)
-
addEnvironmentVar
public void addEnvironmentVar(java.lang.String name, double value)
-
addEnvironmentVar
public void addEnvironmentVar(java.lang.String name, java.lang.Object value)
-
removeEnvironmentVar
public void removeEnvironmentVar(java.lang.String name)
-
getEnvironmentVar
public java.lang.Object getEnvironmentVar(java.lang.String name)
-
addParameter
public void addParameter(java.lang.String key, java.lang.String label, int type, java.lang.Object defaultValue)
-
displayParameterGatherer
public boolean displayParameterGatherer(java.lang.String title)
-
getParamPanel
public GatherParamPanel getParamPanel()
-
getEnvironmentNames
public java.util.Set<java.lang.String> getEnvironmentNames()
-
-