Class GhidraProgramUtilities

java.lang.Object
ghidra.program.util.GhidraProgramUtilities

public class GhidraProgramUtilities extends Object
  • Method Details

    • getCurrentProgram

      public static Program getCurrentProgram(PluginTool tool)
      returns the current program, given a tool, if a program is opened; otherwise returns null.
    • shouldAskToAnalyze

      public static boolean shouldAskToAnalyze(Program program)
      Returns true if the program does not contain the analyzed flag. The assumption is that a non-null value means that the user has already made a decision about analyzing.
      Parameters:
      program - the program to check for the property
      Returns:
      true if the program does not contain the analyzed flag
    • removeAnalyzedFlag

      public static void removeAnalyzedFlag(Program program)
      Removes the analyzed flag from the program properties. With this property removed, the user will be prompted to analyze the program the next time it is opened.
      Parameters:
      program - the program containing the property to be removed
    • setAnalyzedFlag

      public static void setAnalyzedFlag(Program program, boolean analyzed)
      Sets the analyzed flag to the specified value.
      Parameters:
      program - the program to set property
      analyzed - the analyzed flag