summaryrefslogtreecommitdiffstats
path: root/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycoreplugin.cpp
diff options
context:
space:
mode:
authorSandro S. Andrade <sandroandrade@kde.org>2013-11-15 18:55:42 -0300
committerSandro S. Andrade <sandroandrade@kde.org>2013-11-15 22:54:57 +0100
commit936870048b0deac4f15c0ef98d245e2519bb7b4b (patch)
tree645ef07df7b81cce8cc84ab1ae4e5ba157c6d3c8 /examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycoreplugin.cpp
parent845c8c504232d1d664118bcffed91b791a959969 (diff)
Implement plugin loading based on dependencies
- If plugin A depends on plugin B so A implements interfaces defined in B. - Such dependency should be informed in A's .json file, build includes and linker dependencies are automatically handled by qmake. - In DuSE-MT startup, dependent plugins (e.g. A) are loaded first so that , in B initialization, PluginManager can be queried by using pluginsByType() in order to get all plugins implementing a specific interface. Change-Id: I201f12d2ce6972725f3aa11e9815374cf0948c5d Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycoreplugin.cpp')
-rw-r--r--examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycoreplugin.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycoreplugin.cpp b/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycoreplugin.cpp
index 62b1c8b5..54f7995c 100644
--- a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycoreplugin.cpp
+++ b/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycoreplugin.cpp
@@ -40,6 +40,11 @@
****************************************************************************/
#include "architecturerecoverycoreplugin.h"
+#include <QtCore/QDebug>
+
+#include <duseinterfaces/iplugincontroller.h>
+#include "iarchitecturerecoverybackend.h"
+
ArchitectureRecoveryCorePlugin::ArchitectureRecoveryCorePlugin(QObject *parent) :
DuSE::IPlugin(parent)
{
@@ -48,6 +53,7 @@ ArchitectureRecoveryCorePlugin::ArchitectureRecoveryCorePlugin(QObject *parent)
bool ArchitectureRecoveryCorePlugin::initialize(DuSE::ICore *core)
{
Q_UNUSED(core);
+ qDebug() << core->pluginController()->pluginsByType<IArchitectureRecoveryBackend *>();
return true;
}