13 #ifndef BERRYWORKBENCHPLUGIN_H_
14 #define BERRYWORKBENCHPLUGIN_H_
16 #include <Poco/Path.h>
28 #include "internal/berryViewRegistry.h"
29 #include "internal/berryEditorRegistry.h"
30 #include "internal/berryPerspectiveRegistry.h"
31 #include "internal/intro/berryIntroRegistry.h"
62 Q_PLUGIN_METADATA(IID
"org_blueberry_ui_qt")
63 Q_INTERFACES(ctkPluginActivator)
76 EditorRegistry* editorRegistry;
79 ctkPluginContext* bundleContext;
84 ViewRegistry* viewRegistry;
86 PerspectiveRegistry* perspRegistry;
88 IntroRegistry* introRegistry;
92 QScopedPointer<QtStyleManager> styleManager;
176 const QString& extensionName);
197 static bool IsBundleLoadedForExecutableExtension(
229 std::size_t GetBundleCount();
267 C* CreateExtension(
const QString& extensionPointId,
const QString& elementName,
268 const QString& targetID)
272 if (extensionPoint == 0)
275 extensionPointId +
" not found");
281 QList<IConfigurationElement::Pointer> elements(
283 for (
int j = 0; j < elements.size(); j++)
285 if (elementName ==
"" || elementName == elements[j]->GetName())
287 QString strID = elements[j]->GetAttribute(
"id");
288 if (targetID == strID)
290 targetElement = elements[j];
295 if (targetElement.IsNull())
299 +
" in extension point: " + extensionPointId);
306 return targetElement->CreateExecutableExtension<C>(
"class");
308 catch (
const CoreException& )
312 +
" in extension point: " + extensionPointId);
324 IPerspectiveRegistry* GetPerspectiveRegistry();
332 IIntroRegistry* GetIntroRegistry();
346 IViewRegistry* GetViewRegistry();
362 static void Log(
const QString &message);
368 static void Log(
const ctkException& exc);
384 static void Log(
const QString &message,
const ctkException& t);
401 static void Log(
const QString &clazz,
const QString &methodName,
const ctkException& t);
415 static void Log(
const QString& message,
const SmartPointer<IStatus>& status);
421 static void Log(
const SmartPointer<IStatus>& status);
427 void start(ctkPluginContext* context)
override;
442 ctkPluginContext* GetPluginContext();
448 void stop(ctkPluginContext* context)
override;
463 QString GetDataLocation()
const;