#include <berryPlatformUI.h>
The central class for access to the BlueBerry 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
Definition at line 40 of file berryPlatformUI.h.
◆ CreateAndRunWorkbench()
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 createDisplay
to create the display to pass in.
Note that this method is intended to be called by the application (org.blueberry.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 |
advisor | the application-specific advisor that configures and specializes the workbench |
- Returns
- return code RETURN_OK for normal exit; RETURN_RESTART if the workbench was terminated with a call to
IWorkbench.restart
; RETURN_UNSTARTABLE if the workbench could not be started; RETURN_EMERGENCY_CLOSE if the UI quit because of an emergency; other values reserved for future use
◆ CreateDisplay()
static Display* berry::PlatformUI::CreateDisplay |
( |
| ) |
|
|
static |
Creates the Display
to be used by the workbench. It is the caller's responsibility to dispose the resulting Display
, not the workbench's.
- Returns
- the display
◆ GetTestableObject()
static TestableObject::Pointer berry::PlatformUI::GetTestableObject |
( |
| ) |
|
|
static |
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.
- Returns
- the testable object facade
- Since
- 3.0
◆ GetWorkbench()
static IWorkbench* berry::PlatformUI::GetWorkbench |
( |
| ) |
|
|
static |
Returns the workbench. Fails if the workbench has not been created yet.
- Returns
- the workbench. A raw pointer is returned because you normally should not hold a smart pointer to it (and possibly create reference cycles)
◆ IsWorkbenchRunning()
static bool berry::PlatformUI::IsWorkbenchRunning |
( |
| ) |
|
|
static |
Returns whether 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.
- Returns
true
if the workbench has been created and is still running, and false
if the workbench has not yet been created or has completed
- Since
- 3.0
◆ PLUGIN_ID()
static QString berry::PlatformUI::PLUGIN_ID |
( |
| ) |
|
|
static |
◆ RETURN_EMERGENCY_CLOSE
const int berry::PlatformUI::RETURN_EMERGENCY_CLOSE |
|
static |
◆ RETURN_OK
const int berry::PlatformUI::RETURN_OK |
|
static |
◆ RETURN_RESTART
const int berry::PlatformUI::RETURN_RESTART |
|
static |
Return code (value 1) indicating that the workbench was terminated with a call to IWorkbench.restart
.
- See also
- CreateAndRunWorkbench()
-
IWorkbench::Restart
- Since
- 3.0
Definition at line 64 of file berryPlatformUI.h.
◆ RETURN_UNSTARTABLE
const int berry::PlatformUI::RETURN_UNSTARTABLE |
|
static |
◆ XP_VIEWS
const QString berry::PlatformUI::XP_VIEWS |
|
static |
◆ XP_WORKBENCH
const QString berry::PlatformUI::XP_WORKBENCH |
|
static |
The documentation for this class was generated from the following file: