Package org.eclipse.e4.ui.workbench
Interface IWorkbench
-
public interface IWorkbenchA running instance of the workbench. This instance is published through:- the
IEclipseContextof the application - the OSGi-Service-Registry
IWorkbenchinstances in one OSGi-Instance- Since:
- 1.0
- Restriction:
- This interface is not intended to be implemented by clients.
- the
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAPPLICATION_CONTEXT_KEYContext key to retrieve the application context in most applications (like e.g., e4).static java.lang.StringCLEAR_PERSISTED_STATEThe argument for whether the persisted state should be cleared on startup
Value is:clearPersistedStatestatic java.lang.StringCSS_RESOURCE_URI_ARGThe argument for theURIof the resources referenced from the application CSS file
Value is:applicationCSSResourcesstatic java.lang.StringCSS_URI_ARGThe argument for theURIof the application CSS file
Value is:applicationCSSstatic java.lang.StringLIFE_CYCLE_URI_ARGThe argument for theURIof the life-cycle manager
Value is:lifeCycleURIstatic java.lang.StringMODEL_RESOURCE_HANDLERThe argument for the resource handler to use
Value is:modelResourceHandlerstatic java.lang.StringON_TOPThis named context parameter is used to specify whether aMPartor aMPlaceholderare shown on top, which means the contents of it can be seen by the user in the UI.static java.lang.StringPERSIST_STATEThe argument for whether the workbench should save and restore its state
Individual model elements can add it to their persistedState with the value of "false" to declare that they should not be persisted.static java.lang.StringPRESENTATION_URI_ARGThe argument for theURIof the application presentation
Value is:presentationURIstatic java.lang.StringXMI_URI_ARGThe argument for theURIof the applicaton.xmi file
Value is:applicationXMI
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanclose()Close the workbench instanceMApplicationgetApplication()java.lang.StringgetId()booleanrestart()restart the workbench
-
-
-
Field Detail
-
CLEAR_PERSISTED_STATE
static final java.lang.String CLEAR_PERSISTED_STATE
The argument for whether the persisted state should be cleared on startup
Value is:clearPersistedState- See Also:
- Constant Field Values
-
CSS_RESOURCE_URI_ARG
static final java.lang.String CSS_RESOURCE_URI_ARG
The argument for theURIof the resources referenced from the application CSS file
Value is:applicationCSSResources- Since:
- 0.12.0
- See Also:
- Constant Field Values
-
CSS_URI_ARG
static final java.lang.String CSS_URI_ARG
The argument for theURIof the application CSS file
Value is:applicationCSS- Since:
- 0.12.0
- See Also:
- Constant Field Values
-
LIFE_CYCLE_URI_ARG
static final java.lang.String LIFE_CYCLE_URI_ARG
The argument for theURIof the life-cycle manager
Value is:lifeCycleURI- Since:
- 0.12.0
- See Also:
- Constant Field Values
-
MODEL_RESOURCE_HANDLER
static final java.lang.String MODEL_RESOURCE_HANDLER
The argument for the resource handler to use
Value is:modelResourceHandler- See Also:
- Constant Field Values
-
PERSIST_STATE
static final java.lang.String PERSIST_STATE
The argument for whether the workbench should save and restore its state
Individual model elements can add it to their persistedState with the value of "false" to declare that they should not be persisted.
Value is:persistState- See Also:
- Constant Field Values
-
PRESENTATION_URI_ARG
static final java.lang.String PRESENTATION_URI_ARG
The argument for theURIof the application presentation
Value is:presentationURI- Since:
- 0.12.0
- See Also:
- Constant Field Values
-
XMI_URI_ARG
static final java.lang.String XMI_URI_ARG
The argument for theURIof the applicaton.xmi file
Value is:applicationXMI- Since:
- 0.12.0
- See Also:
- Constant Field Values
-
APPLICATION_CONTEXT_KEY
static final java.lang.String APPLICATION_CONTEXT_KEY
Context key to retrieve the application context in most applications (like e.g., e4). This context is the direct child of the root context which is retrieved fromEclipseContextFactory.getServiceContext(org.osgi.framework.BundleContext)- Since:
- 1.4
- See Also:
- Constant Field Values
-
ON_TOP
static final java.lang.String ON_TOP
This named context parameter is used to specify whether aMPartor aMPlaceholderare shown on top, which means the contents of it can be seen by the user in the UI.This means clients can obtain the state of being on top by asking the part's context for the
ON_TOPkey.Note that also objects created with a parts' context can obtain this
ON_TOPkey, e.g.,MToolControl.@Inject @Optional private void onTop(@Named(IWorkbench.ON_TOP) Boolean onTop) { if (onTop != null && onTop.booleanValue()) { // ... do something when element is on top } }- Since:
- 1.5
- See Also:
- Constant Field Values
-
-
Method Detail
-
close
boolean close()
Close the workbench instance- Returns:
trueif the shutdown succeeds
-
getApplication
MApplication getApplication()
- Returns:
- the application model driving the workbench
-
getId
java.lang.String getId()
- Returns:
- unique id of the instance
-
restart
boolean restart()
restart the workbench- Returns:
falseif the restart is aborted
-
-