| |
|
| java.lang.Object org.eclipse.ui.PlatformUI
PlatformUI | final public class PlatformUI (Code) | | The central class for access to the Eclipse Platform User Interface.
This class cannot be instantiated; all functionality is provided by
static methods.
Features provided:
- creation of the workbench.
- access to the workbench.
See Also: IWorkbench |
Field Summary | |
final public static String | PLUGIN_ID Identifies the workbench plug-in. | final public static int | RETURN_EMERGENCY_CLOSE Return code (value 3) indicating that the workbench was terminated with
a call to IWorkbenchConfigurer#emergencyClose. | final public static int | RETURN_OK Return code (value 0) indicating that the workbench terminated normally. | final public static int | RETURN_RESTART Return code (value 1) indicating that the workbench was terminated with
a call to IWorkbench.restart . | final public static int | RETURN_UNSTARTABLE Return code (value 2) indicating that the workbench failed to start. |
Method Summary | |
public static int | createAndRunWorkbench(Display display, WorkbenchAdvisor advisor) Creates the workbench and associates it with the given display and workbench
advisor, and runs the workbench UI. | public static Display | createDisplay() Creates the Display to be used by the workbench. | public static IPreferenceStore | getPreferenceStore() Returns the preference store used for publicly settable workbench preferences. | public static TestableObject | getTestableObject() Returns the testable object facade, for use by the test harness. | public static IWorkbench | getWorkbench() Returns the workbench. | public static boolean | isWorkbenchRunning() Returns whether
PlatformUI.createAndRunWorkbench createAndRunWorkbench has
been called to create the workbench, and the workbench has yet to
terminate.
Note that this method may return true while the workbench
is still being initialized, so it may not be safe to call workbench API
methods even if this method returns true. |
PLUGIN_ID | final public static String PLUGIN_ID(Code) | | Identifies the workbench plug-in.
|
RETURN_EMERGENCY_CLOSE | final public static int RETURN_EMERGENCY_CLOSE(Code) | | Return code (value 3) indicating that the workbench was terminated with
a call to IWorkbenchConfigurer#emergencyClose.
See Also: PlatformUI.createAndRunWorkbench since: 3.0 |
createAndRunWorkbench | public static int createAndRunWorkbench(Display display, WorkbenchAdvisor advisor)(Code) | | Creates the workbench and associates it with the given display and workbench
advisor, and runs the workbench UI. This entails processing and dispatching
events until the workbench is closed or restarted.
This method is intended to be called by the main class (the "application").
Fails if the workbench UI has already been created.
Use
PlatformUI.createDisplay createDisplay to create the display to pass in.
Note that this method is intended to be called by the application
(org.eclipse.core.boot.IPlatformRunnable ). It must be
called exactly once, and early on before anyone else asks
getWorkbench() for the workbench.
Parameters: display - the display to be used for all UI interactions with the workbench Parameters: advisor - the application-specific advisor that configures andspecializes the workbench return code PlatformUI.RETURN_OK RETURN_OK for normal exit; PlatformUI.RETURN_RESTART RETURN_RESTART if the workbench was terminatedwith a call to IWorkbench.restart IWorkbench.restart; PlatformUI.RETURN_UNSTARTABLE RETURN_UNSTARTABLE if the workbench couldnot be started; PlatformUI.RETURN_EMERGENCY_CLOSE RETURN_EMERGENCY_CLOSE if the UI quitbecause of an emergency; other values reserved for future use since: 3.0 |
createDisplay | public static Display createDisplay()(Code) | | Creates the Display to be used by the workbench.
It is the caller's responsibility to dispose the resulting Display ,
not the workbench's.
the display since: 3.0 |
getPreferenceStore | public static IPreferenceStore getPreferenceStore()(Code) | | Returns the preference store used for publicly settable workbench preferences.
Constants for these preferences are defined on
org.eclipse.ui.IWorkbenchPreferenceConstants .
the workbench public preference store since: 3.0 |
getTestableObject | public static TestableObject getTestableObject()(Code) | | Returns the testable object facade, for use by the test harness.
IMPORTANT: This method is only for use by the test harness.
Applications and regular plug-ins should not call this method.
the testable object facade since: 3.0 |
getWorkbench | public static IWorkbench getWorkbench()(Code) | | Returns the workbench. Fails if the workbench has not been created yet.
the workbench |
isWorkbenchRunning | public static boolean isWorkbenchRunning()(Code) | | Returns whether
PlatformUI.createAndRunWorkbench createAndRunWorkbench has
been called to create the workbench, and the workbench has yet to
terminate.
Note that this method may return true while the workbench
is still being initialized, so it may not be safe to call workbench API
methods even if this method returns true. See bug 49316 for details.
true if the workbench has been created and isstill running, and false if the workbench has notyet been created or has completed since: 3.0 |
|
|
|