Package ghidra.program.util
Class GhidraProgramUtilities
java.lang.Object
ghidra.program.util.GhidraProgramUtilities
-
Method Summary
Modifier and TypeMethodDescriptionstatic Program
getCurrentProgram
(PluginTool tool) Returns the current program for the given tool or null if no program is open.static boolean
isAnalyzed
(Program program) Returns true if the program has been analyzed at least once.static void
markProgramAnalyzed
(Program program) Marks the program has having been analyzedstatic void
markProgramNotToAskToAnalyze
(Program program) static void
resetAnalysisFlags
(Program program) Resets the analysis flags to the program defaults With this reset, the user will be prompted to analyze the program the next time it is opened.static boolean
shouldAskToAnalyze
(Program program) Returns true if the user should be asked to analyze.
-
Method Details
-
getCurrentProgram
Returns the current program for the given tool or null if no program is open.- Parameters:
tool
- the tool get get the current program for- Returns:
- the current program for the given tool or null if no program is open
-
shouldAskToAnalyze
Returns true if the user should be asked to analyze. They will only be asked if the program hasn't already been analyzed (analyzed flag property is false or null) or the "ask to analyze" flag property is true or null (default is true unless explicitly set to false).- Parameters:
program
- the program to check for the property- Returns:
- true if the user should be prompted to analyze the program
-
resetAnalysisFlags
Resets the analysis flags to the program defaults With this reset, the user will be prompted to analyze the program the next time it is opened.- Parameters:
program
- the program whose analysis flags should be reset
-
markProgramAnalyzed
Marks the program has having been analyzed- Parameters:
program
- the program to set property
-
markProgramNotToAskToAnalyze
-
isAnalyzed
Returns true if the program has been analyzed at least once.- Parameters:
program
- the program to test to see if it has been analyzed- Returns:
- true if the program has been analyzed at least once.
-