Class LoginWizard

java.lang.Object
org.eclipse.jface.wizard.Wizard
com.developer.nefarious.zjoule.plugin.login.LoginWizard
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider, org.eclipse.jface.wizard.IWizard

public class LoginWizard extends org.eclipse.jface.wizard.Wizard
A wizard for selecting and initiating the login process for an AI provider.

The LoginWizard presents a user interface for choosing between different AI provider login options, such as SAP AI Core and Ollama. It delegates the login process to the corresponding wizard based on the user's selection.

  • Field Summary

    Fields inherited from class org.eclipse.jface.wizard.Wizard

    DEFAULT_IMAGE
  • Constructor Summary

    Constructors
    Constructor
    Description
    LoginWizard(org.eclipse.swt.widgets.Shell shell, org.eclipse.swt.browser.Browser browser)
    Constructs a LoginWizard with the specified shell and browser.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds the login options page to the wizard.
    boolean
    Completes the wizard by initiating the login process based on user selection.

    Methods inherited from class org.eclipse.jface.wizard.Wizard

    addPage, canFinish, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getMinimumWizardSize, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LoginWizard

      public LoginWizard(org.eclipse.swt.widgets.Shell shell, org.eclipse.swt.browser.Browser browser)
      Constructs a LoginWizard with the specified shell and browser.

      This wizard sets up the login selection process and configures the UI title.

      Parameters:
      shell - the parent Shell for displaying the wizard dialog.
      browser - the Browser instance used for login authentication.
  • Method Details

    • addPages

      public void addPages()
      Adds the login options page to the wizard.

      This page presents the available AI provider login choices to the user.

      Specified by:
      addPages in interface org.eclipse.jface.wizard.IWizard
      Overrides:
      addPages in class org.eclipse.jface.wizard.Wizard
    • performFinish

      public boolean performFinish()
      Completes the wizard by initiating the login process based on user selection.

      If the user selects SAP AI Core, the startSapAiCoreLogin() method is triggered. If the user selects Ollama, the startOllamaLogin() method is triggered. The wizard completes successfully if a valid selection is made.

      Specified by:
      performFinish in interface org.eclipse.jface.wizard.IWizard
      Specified by:
      performFinish in class org.eclipse.jface.wizard.Wizard
      Returns:
      true if the login process starts successfully, false otherwise.