Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <berryWorkbenchPlugin.h>
Public Member Functions | |
WorkbenchPlugin () | |
~WorkbenchPlugin () override | |
std::vcl_size_t | GetBundleCount () |
IEditorRegistry * | GetEditorRegistry () |
IElementFactory * | GetElementFactory (const QString &targetID) const |
IPresentationFactory * | GetPresentationFactory () |
IPerspectiveRegistry * | GetPerspectiveRegistry () |
IIntroRegistry * | GetIntroRegistry () |
IViewRegistry * | GetViewRegistry () |
void | start (ctkPluginContext *context) override |
ctkPluginContext * | GetPluginContext () |
void | stop (ctkPluginContext *context) override |
QString | GetDataLocation () const |
![]() | |
AbstractUICTKPlugin () | |
IPreferencesService * | GetPreferencesService () const |
SmartPointer< IPreferences > | GetPreferences () const |
IWorkbench * | GetWorkbench () |
void | start (ctkPluginContext *context) override |
void | stop (ctkPluginContext *context) override |
![]() | |
Plugin () | |
void | start (ctkPluginContext *context) override |
void | stop (ctkPluginContext *context) override |
QSharedPointer< ctkPlugin > | GetPlugin () const |
ILog * | GetLog () const |
QString | GetStateLocation () const |
Static Public Member Functions | |
static bool | HasExecutableExtension (const IConfigurationElement::Pointer &element, const QString &extensionName) |
static bool | IsBundleLoadedForExecutableExtension (const IConfigurationElement::Pointer &element, const QString &extensionName) |
static QSharedPointer< ctkPlugin > | GetBundleForExecutableExtension (const IConfigurationElement::Pointer &element, const QString &extensionName) |
static WorkbenchPlugin * | GetDefault () |
static void | Log (const QString &message) |
static void | Log (const ctkException &exc) |
static void | Log (const QString &message, const ctkException &t) |
static void | Log (const QString &clazz, const QString &methodName, const ctkException &t) |
static void | Log (const QString &message, const SmartPointer< IStatus > &status) |
static void | Log (const SmartPointer< IStatus > &status) |
![]() | |
static QIcon | ImageDescriptorFromPlugin (const QString &pluginId, const QString &imageFilePath) |
static QIcon | GetMissingIcon () |
Static Public Attributes | |
static bool | DEBUG |
static char | PREFERENCE_PAGE_CATEGORY_SEPARATOR |
Additional Inherited Members | |
![]() | |
ctkPluginContext * | m_Context |
This class represents the TOP of the workbench UI world A plugin class is effectively an application wrapper for a plugin & its classes. This class should be thought of as the workbench UI's application class.
This class is responsible for tracking various registries font, preference, graphics, dialog store.
This class is explicitly referenced by the workbench plugin's "plugin.xml" and places it into the UI start extension point of the main overall application harness
When is this class started? When the Application calls createExecutableExtension to create an executable instance of our workbench class.
Definition at line 58 of file berryWorkbenchPlugin.h.
berry::WorkbenchPlugin::WorkbenchPlugin | ( | ) |
Create an instance of the WorkbenchPlugin. The workbench plugin is effectively the "application" for the workbench UI. The entire UI operates as a good plugin citizen.
Definition at line 78 of file berryWorkbenchPlugin.cpp.
|
override |
Definition at line 89 of file berryWorkbenchPlugin.cpp.
std::vcl_size_t berry::WorkbenchPlugin::GetBundleCount | ( | ) |
Definition at line 183 of file berryWorkbenchPlugin.cpp.
|
static |
Returns the bundle that contains the class referenced by an executable extension. Determining the bundle happens in one of two ways:
bundle.id/class.name[:optional attributes]
plugin
attribute element | the element to test |
extensionName | the name of the extension to test for |
null
. Definition at line 127 of file berryWorkbenchPlugin.cpp.
References GetAttribute, and berry::Platform::GetPlugin().
Referenced by IsBundleLoadedForExecutableExtension().
QString berry::WorkbenchPlugin::GetDataLocation | ( | ) | const |
FOR INTERNAL WORKBENCH USE ONLY.
Returns the path to a location in the file system that can be used to persist/restore state between workbench invocations. If the location did not exist prior to this call it will be created. Returns null
if no such location is available.
null
if no such location is available. Definition at line 466 of file berryWorkbenchPlugin.cpp.
|
static |
Return the default instance of the receiver. This represents the runtime plugin.
Definition at line 178 of file berryWorkbenchPlugin.cpp.
Referenced by berry::QtWorkbenchAdvisor::Initialize(), Log(), berry::WorkbenchWindowAdvisor::OpenIntro(), QmitkNodeSelectionButton::paintEvent(), QmitkExtWorkbenchWindowAdvisor::PostWindowCreate(), and berry::QtStyleManager::QtStyleManager().
IEditorRegistry * berry::WorkbenchPlugin::GetEditorRegistry | ( | ) |
Answer the manager that maps resource types to a the description of the editor to use
Definition at line 243 of file berryWorkbenchPlugin.cpp.
IElementFactory * berry::WorkbenchPlugin::GetElementFactory | ( | const QString & | targetID | ) | const |
Answer the element factory for an id, or null</code. if not found.
targetID |
Definition at line 251 of file berryWorkbenchPlugin.cpp.
References berry::IExtensionRegistry::GetExtensionPoint(), berry::Platform::GetExtensionRegistry(), berry::CoreException::GetStatus(), Log(), and berry::PlatformUI::PLUGIN_ID().
IIntroRegistry * berry::WorkbenchPlugin::GetIntroRegistry | ( | ) |
Returns the introduction registry.
Definition at line 226 of file berryWorkbenchPlugin.cpp.
IPerspectiveRegistry * berry::WorkbenchPlugin::GetPerspectiveRegistry | ( | ) |
Return the perspective registry.
Definition at line 190 of file berryWorkbenchPlugin.cpp.
ctkPluginContext * berry::WorkbenchPlugin::GetPluginContext | ( | ) |
Returns the bundle context associated with the workbench plug-in.
Definition at line 450 of file berryWorkbenchPlugin.cpp.
Referenced by berry::QtWorkbenchAdvisor::Initialize(), and QmitkNodeSelectionButton::paintEvent().
IPresentationFactory * berry::WorkbenchPlugin::GetPresentationFactory | ( | ) |
Returns the presentation factory with the given id, or null
if not found.
targetID | The id of the presentation factory to use. |
null
if not factory matches that id. Definition at line 300 of file berryWorkbenchPlugin.cpp.
References Log().
IViewRegistry * berry::WorkbenchPlugin::GetViewRegistry | ( | ) |
Answer the view registry.
Definition at line 235 of file berryWorkbenchPlugin.cpp.
|
static |
Answers whether the provided element either has an attribute with the given name or a child element with the given name with an attribute called class.
element | the element to test |
extensionName | the name of the extension to test for |
Definition at line 100 of file berryWorkbenchPlugin.cpp.
References GetAttribute.
|
static |
Checks to see if the provided element has the syntax for an executable extension with a given name that resides in a bundle that is already active. Determining the bundle happens in one of two ways:
bundle.id/class.name[:optional attributes]
plugin
attribute element | the element to test |
extensionName | the name of the extension to test for |
Definition at line 117 of file berryWorkbenchPlugin.cpp.
References GetBundleForExecutableExtension().
|
static |
Logs the given message to the platform log.
If you have an exception in hand, call log(String, Throwable) instead.
If you have a status object in hand call log(String, IStatus) instead.
This convenience method is for internal use by the Workbench only and must not be called outside the Workbench.
message | A high level UI message describing when the problem happened. |
Definition at line 314 of file berryWorkbenchPlugin.cpp.
References BERRY_INFO.
Referenced by berry::CommandContributionItem::CommandContributionItem(), GetElementFactory(), berry::XMLMemento::GetFloat(), berry::XMLMemento::GetInteger(), GetPresentationFactory(), Log(), and berry::CommandContributionItem::UpdateCommandPropertiesInUI().
|
static |
Log the throwable.
t |
Definition at line 320 of file berryWorkbenchPlugin.cpp.
References BERRY_INFO.
|
static |
Logs the given message and throwable to the platform log.
If you have a status object in hand call log(String, IStatus) instead.
This convenience method is for internal use by the Workbench only and must not be called outside the Workbench.
message | A high level UI message describing when the problem happened. |
t | The throwable from where the problem actually occurred. |
Definition at line 330 of file berryWorkbenchPlugin.cpp.
References Log().
|
static |
Logs the given throwable to the platform log, indicating the class and method from where it is being logged (this is not necessarily where it occurred).
This convenience method is for internal use by the Workbench only and must not be called outside the Workbench.
clazz | The calling class. |
methodName | The calling method name. |
t | The throwable from where the problem actually occurred. |
Definition at line 336 of file berryWorkbenchPlugin.cpp.
References Log().
|
static |
Logs the given message and status to the platform log.
This convenience method is for internal use by the Workbench only and must not be called outside the Workbench.
message | A high level UI message describing when the problem happened. May be null . |
status | The status describing the problem. Must not be null. |
Definition at line 345 of file berryWorkbenchPlugin.cpp.
References BERRY_STATUS_LOC, berry::IStatus::ERROR_TYPE, GetDefault(), berry::Plugin::GetLog(), and berry::ILog::Log().
|
static |
Log the status to the default log.
status |
Definition at line 357 of file berryWorkbenchPlugin.cpp.
References GetDefault(), berry::Plugin::GetLog(), and berry::ILog::Log().
|
override |
Definition at line 362 of file berryWorkbenchPlugin.cpp.
References BERRY_REGISTER_EXTENSION_CLASS, berry::AbstractSourceProvider::DEBUG, and berry::AbstractUICTKPlugin::start().
|
override |
Definition at line 455 of file berryWorkbenchPlugin.cpp.
References berry::AbstractUICTKPlugin::stop().
|
static |
Global workbench ui plugin flag. Only workbench implementation is allowed to use this flag All other plugins, examples, or test cases must not use this flag.
Definition at line 101 of file berryWorkbenchPlugin.h.
|
static |
The character used to separate preference page category ids
Definition at line 106 of file berryWorkbenchPlugin.h.