Class Initialization
java.lang.Object
com.developer.nefarious.zjoule.plugin.core.events.Initialization
- All Implemented Interfaces:
Runnable
Handles the initialization process for the application by managing user sessions,
loading message history, and updating the browser state.
This class implements Runnable
and can be used in thread-based operations
for initializing components in the Eclipse environment.
-
Constructor Summary
ConstructorDescriptionInitialization
(org.eclipse.swt.browser.Browser browser) Constructs anInitialization
instance with the specifiedBrowser
. -
Method Summary
-
Constructor Details
-
Initialization
public Initialization(org.eclipse.swt.browser.Browser browser) Constructs anInitialization
instance with the specifiedBrowser
.- Parameters:
browser
- theBrowser
instance used during initialization.
-
-
Method Details
-
run
public void run()Executes the initialization process.The method performs the following steps:
- Checks if the user is logged in using
SessionManager.isUserLoggedIn()
. - If logged in, logs the user in via
SessionManager.login(Browser)
and updates tags usingTagHandler.update(Browser)
. - If not logged in, logs the user out using
SessionManager.logout(Browser, EclipseMemory)
. - Loads the chat message history from memory using
MessageHistoryLoader.loadFromMemory(Browser)
. - Executes a JavaScript function,
updatePlaceholder()
, in the browser to update the UI.
- Checks if the user is logged in using
-