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();
268 C* CreateExtension(
const QString& extensionPointId,
const QString& elementName,
269 const QString& targetID)
273 if (extensionPoint == 0)
276 extensionPointId +
" not found");
282 QList<IConfigurationElement::Pointer> elements(
284 for (
int j = 0; j < elements.size(); j++)
286 if (elementName ==
"" || elementName == elements[j]->
GetName())
288 QString strID = elements[j]->GetAttribute(
"id");
289 if (targetID == strID)
291 targetElement = elements[j];
296 if (targetElement.IsNull())
300 +
" in extension point: " + extensionPointId);
307 return targetElement->CreateExecutableExtension<C>(
"class");
313 +
" in extension point: " + extensionPointId);
333 IIntroRegistry* GetIntroRegistry();
363 static void Log(
const QString &message);
369 static void Log(
const ctkException& exc);
385 static void Log(
const QString &message,
const ctkException& t);
402 static void Log(
const QString &clazz,
const QString &methodName,
const ctkException& t);
428 void start(ctkPluginContext* context)
override;
443 ctkPluginContext* GetPluginContext();
449 void stop(ctkPluginContext* context)
override;
464 QString GetDataLocation()
const;
static void Log(const QString &message)
virtual SmartPointer< IExtensionPoint > GetExtensionPoint(const QString &extensionPointId) const =0
static char PREFERENCE_PAGE_CATEGORY_SEPARATOR
static std::string GetName(std::string fileName, std::string suffix)