Class SecondOllamaLoginWizardPage
java.lang.Object
org.eclipse.jface.dialogs.DialogPage
org.eclipse.jface.wizard.WizardPage
com.developer.nefarious.zjoule.plugin.login.pages.SecondOllamaLoginWizardPage
- All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage
,org.eclipse.jface.dialogs.IMessageProvider
,org.eclipse.jface.wizard.IWizardPage
public class SecondOllamaLoginWizardPage
extends org.eclipse.jface.wizard.WizardPage
The second wizard page for selecting an Ollama model.
The SecondOllamaLoginWizardPage
allows users to select a model from
a dropdown list populated with available Ollama models retrieved from the API.
The selection is stored in memory and used during the login process.
-
Field Summary
FieldsFields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
-
Constructor Summary
ConstructorsConstructorDescriptionSecondOllamaLoginWizardPage
(IMemoryObject<OllamaModel> memoryOllamaModel) Constructs aSecondOllamaLoginWizardPage
for selecting an Ollama model. -
Method Summary
Modifier and TypeMethodDescriptionvoid
createControl
(org.eclipse.swt.widgets.Composite parent) Creates the UI components for the wizard page.org.eclipse.swt.widgets.Combo
Retrieves the dropdown component used for selecting an Ollama model.Retrieves the list of Ollama models available for selection.void
setOllamaModelsForSelection
(GetOllamaModelsResponse getOllamaModelsResponse) Populates the dropdown menu with available Ollama models.void
setVisible
(boolean visible) Controls the visibility of the wizard page.Methods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, 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
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
Methods inherited from interface org.eclipse.jface.wizard.IWizardPage
getMinimumPageSize
-
Field Details
-
PAGE_ID
The unique identifier for this wizard page.- See Also:
-
-
Constructor Details
-
SecondOllamaLoginWizardPage
Constructs aSecondOllamaLoginWizardPage
for selecting an Ollama model.- Parameters:
memoryOllamaModel
- the memory object for storing the selected Ollama model.
-
-
Method Details
-
createControl
public void createControl(org.eclipse.swt.widgets.Composite parent) Creates the UI components for the wizard page.This method sets up a dropdown menu for selecting an Ollama model and attaches an event listener to handle model selection.
- Parameters:
parent
- the parent composite in which UI components are created.
-
getOllamaModelsForSelection
Retrieves the list of Ollama models available for selection.- Returns:
- a list of
OllamaModel
objects.
-
setOllamaModelsForSelection
Populates the dropdown menu with available Ollama models.This method extracts model names from the API response and updates the selection list.
- Parameters:
getOllamaModelsResponse
- the API response containing the available models.
-
getOllamaModelDropdown
public org.eclipse.swt.widgets.Combo getOllamaModelDropdown()Retrieves the dropdown component used for selecting an Ollama model.- Returns:
- the
Combo
component for model selection.
-
setVisible
public void setVisible(boolean visible) Controls the visibility of the wizard page.When the page is hidden, it deselects all options and marks the page as incomplete.
- Specified by:
setVisible
in interfaceorg.eclipse.jface.dialogs.IDialogPage
- Overrides:
setVisible
in classorg.eclipse.jface.dialogs.DialogPage
- Parameters:
visible
-true
if the page is being shown,false
otherwise.
-