Package org.eclipse.e4.ui.workbench
Interface IWorkbench
- All Known Implementing Classes:
Workbench
public interface IWorkbench
A running instance of the workbench.
This instance is published through:
- the
IEclipseContext
of the application - the OSGi-Service-Registry
IWorkbench
instances in one
OSGi-Instance- Since:
- 1.0
- Restriction:
- This interface is not intended to be implemented by clients.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Context key to retrieve the application context in most applications (like e.g., e4).static final String
The argument for whether the persisted state should be cleared on startup
Value is:clearPersistedState
static final String
The argument for theURI
of the resources referenced from the application CSS file
Value is:applicationCSSResources
static final String
static final String
static final String
The argument for the resource handler to use
Value is:modelResourceHandler
static final String
This named context parameter is used to specify whether aMPart
or aMPlaceholder
are shown on top, which means the contents of it can be seen by the user in the UI.static final String
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.static final String
static final String
-
Method Summary
-
Field Details
-
CLEAR_PERSISTED_STATE
The argument for whether the persisted state should be cleared on startup
Value is:clearPersistedState
- See Also:
-
CSS_RESOURCE_URI_ARG
The argument for theURI
of the resources referenced from the application CSS file
Value is:applicationCSSResources
- Since:
- 0.12.0
- See Also:
-
CSS_URI_ARG
- Since:
- 0.12.0
- See Also:
-
LIFE_CYCLE_URI_ARG
- Since:
- 0.12.0
- See Also:
-
MODEL_RESOURCE_HANDLER
The argument for the resource handler to use
Value is:modelResourceHandler
- See Also:
-
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:
-
PRESENTATION_URI_ARG
- Since:
- 0.12.0
- See Also:
-
XMI_URI_ARG
- Since:
- 0.12.0
- See Also:
-
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:
-
ON_TOP
This named context parameter is used to specify whether aMPart
or aMPlaceholder
are 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_TOP
key.Note that also objects created with a parts' context can obtain this
ON_TOP
key, 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:
-
-
Method Details
-
close
boolean close()Close the workbench instance- Returns:
true
if the shutdown succeeds
-
getApplication
MApplication getApplication()- Returns:
- the application model driving the workbench
-
getId
String getId()- Returns:
- unique id of the instance
-
restart
boolean restart()restart the workbench- Returns:
false
if the restart is aborted
-