Class FirstOllamaLoginWizardPage

java.lang.Object
org.eclipse.jface.dialogs.DialogPage
org.eclipse.jface.wizard.WizardPage
com.developer.nefarious.zjoule.plugin.login.pages.FirstOllamaLoginWizardPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage

public class FirstOllamaLoginWizardPage extends org.eclipse.jface.wizard.WizardPage
The first wizard page for setting up an Ollama instance.

The FirstOllamaLoginWizardPage allows the user to enter the local Ollama endpoint and validates its existence by retrieving the available models. If the endpoint is invalid, an error message is displayed.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The unique identifier for this wizard page.

    Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider

    ERROR, INFORMATION, NONE, WARNING
  • Constructor Summary

    Constructors
    Constructor
    Description
    FirstOllamaLoginWizardPage(IOllamaLoginClient ollamaLoginClient, IMemoryObject<String> memoryOllamaEndpoint)
    Constructs a FirstOllamaLoginWizardPage for entering the Ollama endpoint.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determines whether the next wizard page can be displayed.
    void
    createControl(org.eclipse.swt.widgets.Composite parent)
    Creates the UI components for the wizard page.
    org.eclipse.jface.wizard.IWizardPage
    Retrieves the next wizard page after validating the entered Ollama endpoint.

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

    getContainer, getDialogSettings, getImage, getName, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString

    Methods inherited from class org.eclipse.jface.dialogs.DialogPage

    convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage

    dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible

    Methods inherited from interface org.eclipse.jface.wizard.IWizardPage

    getMinimumPageSize
  • Field Details

  • Constructor Details

    • FirstOllamaLoginWizardPage

      public FirstOllamaLoginWizardPage(IOllamaLoginClient ollamaLoginClient, IMemoryObject<String> memoryOllamaEndpoint)
      Constructs a FirstOllamaLoginWizardPage for entering the Ollama endpoint.
      Parameters:
      ollamaLoginClient - the client for querying available Ollama models.
      memoryOllamaEndpoint - the memory object for storing the selected endpoint.
  • Method Details

    • createControl

      public void createControl(org.eclipse.swt.widgets.Composite parent)
      Creates the UI components for the wizard page.
      Parameters:
      parent - the parent composite in which UI components are created.
    • canFlipToNextPage

      public boolean canFlipToNextPage()
      Determines whether the next wizard page can be displayed.
      Specified by:
      canFlipToNextPage in interface org.eclipse.jface.wizard.IWizardPage
      Overrides:
      canFlipToNextPage in class org.eclipse.jface.wizard.WizardPage
      Returns:
      true to allow navigation to the next page.
    • getNextPage

      public org.eclipse.jface.wizard.IWizardPage getNextPage()
      Retrieves the next wizard page after validating the entered Ollama endpoint.

      If the endpoint is empty or invalid, an error message is displayed and navigation to the next page is blocked.

      Specified by:
      getNextPage in interface org.eclipse.jface.wizard.IWizardPage
      Overrides:
      getNextPage in class org.eclipse.jface.wizard.WizardPage
      Returns:
      the next IWizardPage, or null if validation fails.