Class OllamaLoginWizard

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

public class OllamaLoginWizard extends org.eclipse.jface.wizard.Wizard
A wizard for handling the Ollama login process.

The OllamaLoginWizard guides the user through multiple steps to authenticate with Ollama and configure its endpoint and model settings. The wizard clears existing sessions before finalizing the login process.

  • Field Summary

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

    DEFAULT_IMAGE
  • Constructor Summary

    Constructors
    Constructor
    Description
    OllamaLoginWizard(org.eclipse.swt.browser.Browser browser)
    Constructs an OllamaLoginWizard with the specified browser.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds the necessary pages to the wizard for configuring the Ollama login.
    boolean
    Completes the wizard by persisting the login configuration and logging in.

    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

    • OllamaLoginWizard

      public OllamaLoginWizard(org.eclipse.swt.browser.Browser browser)
      Constructs an OllamaLoginWizard with the specified browser.

      Initializes the wizard with a title and configures an instance of OllamaLoginClient for handling API interactions.

      Parameters:
      browser - the Browser instance used for authentication.
  • Method Details

    • addPages

      public void addPages()
      Adds the necessary pages to the wizard for configuring the Ollama login.

      The wizard includes:

      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 persisting the login configuration and logging in.

      This method:

      Specified by:
      performFinish in interface org.eclipse.jface.wizard.IWizard
      Specified by:
      performFinish in class org.eclipse.jface.wizard.Wizard
      Returns:
      true to indicate that the login process was successfully completed.