Class OllamaModelSelectionAdapter

java.lang.Object
org.eclipse.swt.events.SelectionAdapter
com.developer.nefarious.zjoule.plugin.login.events.OllamaModelSelectionAdapter
All Implemented Interfaces:
EventListener, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.internal.SWTEventListener

public class OllamaModelSelectionAdapter extends org.eclipse.swt.events.SelectionAdapter
A selection adapter for handling Ollama model selection events.

The OllamaModelSelectionAdapter listens for selection events on the Ollama model dropdown in the SecondOllamaLoginWizardPage. It retrieves the selected model and stores it in memory, while also updating the wizard page's completion state.

  • Constructor Details

    • OllamaModelSelectionAdapter

      public OllamaModelSelectionAdapter(SecondOllamaLoginWizardPage secondOllamaLoginWizardPage, IMemoryObject<OllamaModel> memoryOllamaModel)
      Constructs an OllamaModelSelectionAdapter for handling model selection events.
      Parameters:
      secondOllamaLoginWizardPage - the wizard page containing the model selection dropdown.
      memoryOllamaModel - the memory object used to persist the selected model.
  • Method Details

    • widgetSelected

      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
      Handles the selection event for the Ollama model dropdown.

      If a model is selected, it is stored in memory, and the wizard page is marked as complete. If no model is selected, the wizard page remains incomplete.

      Specified by:
      widgetSelected in interface org.eclipse.swt.events.SelectionListener
      Overrides:
      widgetSelected in class org.eclipse.swt.events.SelectionAdapter
      Parameters:
      e - the SelectionEvent triggered by user selection.