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
ConstructorsConstructorDescriptionLoginWizard
(org.eclipse.swt.widgets.Shell shell, org.eclipse.swt.browser.Browser browser) Constructs aLoginWizard
with the specified shell and browser. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPages()
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
-
Constructor Details
-
LoginWizard
public LoginWizard(org.eclipse.swt.widgets.Shell shell, org.eclipse.swt.browser.Browser browser) Constructs aLoginWizard
with the specified shell and browser.This wizard sets up the login selection process and configures the UI title.
- Parameters:
shell
- the parentShell
for displaying the wizard dialog.browser
- theBrowser
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 interfaceorg.eclipse.jface.wizard.IWizard
- Overrides:
addPages
in classorg.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, thestartOllamaLogin()
method is triggered. The wizard completes successfully if a valid selection is made.- Specified by:
performFinish
in interfaceorg.eclipse.jface.wizard.IWizard
- Specified by:
performFinish
in classorg.eclipse.jface.wizard.Wizard
- Returns:
true
if the login process starts successfully,false
otherwise.
-