Class RepositoryStep

java.lang.Object
docking.wizard.WizardStep<ProjectWizardData>
ghidra.framework.main.wizard.project.RepositoryStep

public class RepositoryStep extends WizardStep<ProjectWizardData>
Wizard step in the new project wizard selecting or creating a new repository in a Ghidra server.
  • Constructor Details

  • Method Details

    • initialize

      public void initialize(ProjectWizardData data)
      Description copied from class: WizardStep
      Initialize the panel as though this is the first time it is being displayed. This is where the step should initialize all Gui fields from the given data object.

      Creating the Gui component can be done lazily in this method if not done in the constructor, as the initialize() method will always be called before the getComponent() method is called. Just be careful as this method can be called multiple times if the user backtracks in the wizard dialog.

      Specified by:
      initialize in class WizardStep<ProjectWizardData>
      Parameters:
      data - the custom wizard data containing the information from all previous steps.
    • isValid

      public boolean isValid()
      Description copied from class: WizardStep
      Checks if the Gui component has completed and has valid information. Typically, whenever the Gui state changes, it notifies the model using the statusChangedCallback, which in turn will call the isValid() method on the current step. If the current step is valid, it will in turn trigger additional calls to follow-on steps to see if the wizard can finish.
      Specified by:
      isValid in class WizardStep<ProjectWizardData>
      Returns:
      true if the Gui component has completed and valid information and is eligible to continue to the next step.
    • populateData

      public void populateData(ProjectWizardData data)
      Description copied from class: WizardStep
      This method should populate the given data object with information from its Gui component.
      Specified by:
      populateData in class WizardStep<ProjectWizardData>
      Parameters:
      data - the custom wizard data containing the information from all previous steps.
    • getComponent

      public JComponent getComponent()
      Description copied from class: WizardStep
      Get the panel object
      Specified by:
      getComponent in class WizardStep<ProjectWizardData>
      Returns:
      JPanel panel
    • apply

      public boolean apply(ProjectWizardData data)
      Description copied from class: WizardStep
      This method is called on the current step when advancing to the next step. It is also called on all subsequent steps when finishing the wizard as those steps are skipped because the finish button was pressed. This method is for steps to perform more extensive operations when moving on to subsequent steps. Most steps can just return true here as simple data will be added during the WizardStep.populateData(Object) method.
      Specified by:
      apply in class WizardStep<ProjectWizardData>
      Parameters:
      data - the custom wizard data containing the information from all previous steps.
      Returns:
      true if the apply completes successfully.
    • canFinish

      public boolean canFinish(ProjectWizardData data)
      Description copied from class: WizardStep
      Reports true if the information in the given data object is sufficient enough that this step does not need to be shown in order to complete the wizard. It is only called on steps subsequent to the current step. Wizard steps should only make their decisions based on the information in the data object and not their internal GUI, which might not have even been initialized at this point. This method is only called on steps whose WizardStep.isApplicable(Object) method returns true.
      Specified by:
      canFinish in class WizardStep<ProjectWizardData>
      Parameters:
      data - the custom wizard data containing the information from all previous steps.
      Returns:
      true if this step does not need to be shown before completing the wizard
    • isApplicable

      public boolean isApplicable(ProjectWizardData data)
      Description copied from class: WizardStep
      Returns true if a step is applicable base on the information in the given data object. Data from previous steps may make a subsequent step applicable or not.
      Overrides:
      isApplicable in class WizardStep<ProjectWizardData>
      Parameters:
      data - the custom wizard data containing the information from all previous steps.
      Returns: