public class E4Application extends AbstractE4Application
Modifier and Type | Field and Description |
---|---|
protected org.osgi.service.event.EventAdmin |
eventAdmin |
THEME_ID
Constructor and Description |
---|
E4Application() |
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.core.databinding.observable.Realm |
createRealm(org.eclipse.e4.core.contexts.IEclipseContext appContext)
Create a databinding realm
|
protected org.eclipse.e4.ui.workbench.IResourceUtilities<javafx.scene.image.Image> |
createResourceUtility(org.eclipse.e4.core.contexts.IEclipseContext appContext)
Create the utility to handle resources
|
protected UISynchronize |
createSynchronizer(org.eclipse.e4.core.contexts.IEclipseContext appContext)
Create a synchronizer instance who synchronizes between UI and none-UI
threads
|
org.eclipse.equinox.app.IApplicationContext |
getApplicationContext() |
protected java.lang.String |
getDefaultPresentationEngineURI(org.eclipse.e4.core.contexts.IEclipseContext appContext)
Get the uri of the presentation engine
|
static @NonNull E4Application |
getE4Application()
Gets the
E4Application . |
protected java.lang.Class<? extends javafx.application.Application> |
getJfxApplicationClass()
Gets the class which should be launched.
|
boolean |
initE4Workbench(org.eclipse.equinox.app.IApplicationContext context,
javafx.application.Application jfxApplication,
javafx.stage.Stage primaryStage)
Initializes the
E4Workbench . |
void |
jfxStart(org.eclipse.equinox.app.IApplicationContext context,
javafx.application.Application jfxApplication,
javafx.stage.Stage primaryStage)
Binds the given
Application to the E4Workbench and
launches the application. |
void |
jfxStop()
Stops the application.
|
protected void |
launchE4JavaFxApplication()
Launches the JavaFX application by calling the
Application.launch(Class, String...) method. |
protected void |
postJfxStarted(org.eclipse.equinox.app.IApplicationContext context)
Performs additional actions just after staring the application.
|
protected void |
preLifecycle(org.eclipse.e4.core.contexts.IEclipseContext appContext)
Called before the lifecycle handler is created
|
protected void |
sendEvent(java.lang.String topic,
java.util.Map<java.lang.String,java.lang.Object> map)
Sends the event.
|
java.lang.Object |
start(org.eclipse.equinox.app.IApplicationContext context) |
void |
stop() |
checkInstanceLocation, createApplicationContext, createE4Workbench, getApplicationArguments, getArgValue, getLifecycleManager, initializeApplicationServices, initializeServices, initializeWindowServices, initWindowContext, preCreateWorkbench, saveModel
public static @NonNull E4Application getE4Application()
E4Application
.
The E4Application
is not available prior to calling the
start(IApplicationContext)
by the equinox's launcher.
E4Application
.public java.lang.Object start(org.eclipse.equinox.app.IApplicationContext context) throws java.lang.Exception
java.lang.Exception
public void jfxStart(org.eclipse.equinox.app.IApplicationContext context, javafx.application.Application jfxApplication, javafx.stage.Stage primaryStage)
Application
to the E4Workbench
and
launches the application.
If the E4Workbench
has not been initialized yet then the
initE4Workbench
method will be called before launching the application.
context
- the IApplicationContext
.jfxApplication
- the Application
.primaryStage
- the primary stage associated with the given
Application
.protected void preLifecycle(org.eclipse.e4.core.contexts.IEclipseContext appContext)
AbstractE4Application
preLifecycle
in class AbstractE4Application
appContext
- the application contextpublic void jfxStop()
public void stop()
public boolean initE4Workbench(org.eclipse.equinox.app.IApplicationContext context, javafx.application.Application jfxApplication, javafx.stage.Stage primaryStage)
E4Workbench
.
By calling this method the E4Workbench
is initialized but the UI
is not displayed yet. By combining calling this method and the
jfxStart
method the developer can create a custom initializer which might do
additional actions between creating IWorkbench
and showing the
UI.
context
- the IApplicationContext
.jfxApplication
- the application which is going to be launched.primaryStage
- the primary stage.true
if the workbench was initialized successfullypublic org.eclipse.equinox.app.IApplicationContext getApplicationContext()
IApplicationContext
.protected void launchE4JavaFxApplication() throws java.lang.Exception
Application.launch(Class, String...)
method.
NOTE: this method is intended to be overridden by subclasses of
the E4Application
that would like provide a custom application
launcher.
java.lang.Exception
- when the application could not be started.protected java.lang.Class<? extends javafx.application.Application> getJfxApplicationClass()
Application
.
NOTE: this method is intended to be overridden by subclasses of
the E4Application
that would like to provide a custom
implementation of the Application
class.
protected void postJfxStarted(org.eclipse.equinox.app.IApplicationContext context)
context
- the IApplicationContext
.protected UISynchronize createSynchronizer(org.eclipse.e4.core.contexts.IEclipseContext appContext)
AbstractE4Application
createSynchronizer
in class AbstractE4Application
appContext
- the contextprotected org.eclipse.core.databinding.observable.Realm createRealm(org.eclipse.e4.core.contexts.IEclipseContext appContext)
AbstractE4Application
createRealm
in class AbstractE4Application
appContext
- the contextprotected org.eclipse.e4.ui.workbench.IResourceUtilities<javafx.scene.image.Image> createResourceUtility(org.eclipse.e4.core.contexts.IEclipseContext appContext)
AbstractE4Application
createResourceUtility
in class AbstractE4Application
appContext
- the contextprotected java.lang.String getDefaultPresentationEngineURI(org.eclipse.e4.core.contexts.IEclipseContext appContext)
AbstractE4Application
getDefaultPresentationEngineURI
in class AbstractE4Application
appContext
- the contextprotected void sendEvent(java.lang.String topic, java.util.Map<java.lang.String,java.lang.Object> map)
topic
- the topic.map
- the payload data.