public abstract class AbstractE4Application
extends java.lang.Object
implements org.eclipse.equinox.app.IApplication
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
THEME_ID
Context-Key name for the theme-id slot
|
Constructor and Description |
---|
AbstractE4Application() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkInstanceLocation(@Nullable org.eclipse.osgi.service.datalocation.Location instanceLocation,
@NonNull org.eclipse.e4.core.contexts.IEclipseContext context)
Check the instance location
|
protected org.eclipse.e4.core.contexts.IEclipseContext |
createApplicationContext()
Setup the application context
|
@Nullable org.eclipse.e4.ui.internal.workbench.E4Workbench |
createE4Workbench(org.eclipse.equinox.app.IApplicationContext applicationContext,
org.eclipse.e4.core.contexts.IEclipseContext appContext)
Create the workbench instance
|
protected abstract @NonNull org.eclipse.core.databinding.observable.Realm |
createRealm(@NonNull org.eclipse.e4.core.contexts.IEclipseContext context)
Create a databinding realm
|
protected abstract @NonNull org.eclipse.e4.ui.workbench.IResourceUtilities<?> |
createResourceUtility(@NonNull org.eclipse.e4.core.contexts.IEclipseContext context)
Create the utility to handle resources
|
protected abstract @NonNull UISynchronize |
createSynchronizer(@NonNull org.eclipse.e4.core.contexts.IEclipseContext context)
Create a synchronizer instance who synchronizes between UI and none-UI
threads
|
protected static java.lang.String[] |
getApplicationArguments(org.eclipse.equinox.app.IApplicationContext applicationContext)
Extract an application arguments
|
protected static @Nullable java.lang.String |
getArgValue(java.lang.String argName,
org.eclipse.equinox.app.IApplicationContext applicationContext,
boolean singledCmdArgValue)
Try to access the argument value from different sources:
The application arguments
The product extension point
The System-Properties
|
protected abstract @NonNull java.lang.String |
getDefaultPresentationEngineURI(@NonNull org.eclipse.e4.core.contexts.IEclipseContext context)
Get the uri of the presentation engine
|
protected @Nullable java.lang.Object |
getLifecycleManager() |
protected void |
initializeApplicationServices(org.eclipse.e4.core.contexts.IEclipseContext appContext)
Initialize the application services
|
protected void |
initializeServices(org.eclipse.e4.ui.model.application.MApplication appModel)
Initialize the services
|
protected void |
initializeWindowServices(org.eclipse.e4.ui.model.application.ui.basic.MWindow childWindow)
Initialize the window services
|
protected void |
initWindowContext(org.eclipse.e4.core.contexts.IEclipseContext windowContext)
Initialize the window context
|
protected void |
preCreateWorkbench(org.eclipse.e4.core.contexts.IEclipseContext appContext)
Called before the workbench is created
|
protected void |
preLifecycle(org.eclipse.e4.core.contexts.IEclipseContext appContext)
Called before the lifecycle handler is created
|
void |
saveModel()
save the model
|
public static final java.lang.String THEME_ID
protected abstract @NonNull UISynchronize createSynchronizer(@NonNull org.eclipse.e4.core.contexts.IEclipseContext context)
context
- the contextprotected abstract @NonNull org.eclipse.core.databinding.observable.Realm createRealm(@NonNull org.eclipse.e4.core.contexts.IEclipseContext context)
context
- the contextprotected abstract @NonNull org.eclipse.e4.ui.workbench.IResourceUtilities<?> createResourceUtility(@NonNull org.eclipse.e4.core.contexts.IEclipseContext context)
context
- the contextprotected abstract @NonNull java.lang.String getDefaultPresentationEngineURI(@NonNull org.eclipse.e4.core.contexts.IEclipseContext context)
context
- the contextprotected static java.lang.String[] getApplicationArguments(org.eclipse.equinox.app.IApplicationContext applicationContext)
applicationContext
- the application contextpublic @Nullable org.eclipse.e4.ui.internal.workbench.E4Workbench createE4Workbench(org.eclipse.equinox.app.IApplicationContext applicationContext, org.eclipse.e4.core.contexts.IEclipseContext appContext)
applicationContext
- the OSGi application contextappContext
- the application contextpublic void saveModel()
protected @Nullable java.lang.Object getLifecycleManager()
protected void preLifecycle(org.eclipse.e4.core.contexts.IEclipseContext appContext)
appContext
- the application contextprotected void preCreateWorkbench(org.eclipse.e4.core.contexts.IEclipseContext appContext)
appContext
- the contextprotected org.eclipse.e4.core.contexts.IEclipseContext createApplicationContext()
protected void initializeServices(org.eclipse.e4.ui.model.application.MApplication appModel)
appModel
- the application modelprotected void initializeApplicationServices(org.eclipse.e4.core.contexts.IEclipseContext appContext)
appContext
- the application contextprotected void initializeWindowServices(org.eclipse.e4.ui.model.application.ui.basic.MWindow childWindow)
childWindow
- the windowprotected void initWindowContext(org.eclipse.e4.core.contexts.IEclipseContext windowContext)
windowContext
- the window contextprotected static @Nullable java.lang.String getArgValue(java.lang.String argName, org.eclipse.equinox.app.IApplicationContext applicationContext, boolean singledCmdArgValue)
argName
- the argument nameapplicationContext
- the application contextsingledCmdArgValue
- true
if the argument is single valuednull
public boolean checkInstanceLocation(@Nullable org.eclipse.osgi.service.datalocation.Location instanceLocation, @NonNull org.eclipse.e4.core.contexts.IEclipseContext context)
instanceLocation
- the location to checkcontext
- the contexttrue
if the location is fine