File indexing completed on 2024-05-05 16:41:33

0001 /*
0002     SPDX-FileCopyrightText: 2012 Sven Brauch <svenbrauch@googlemail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include <kexportplugin.h>
0008 #include <kpluginfactory.h>
0009 #include <KAboutData>
0010 #include <KLocalizedString>
0011 
0012 #include "pdbdebuggerplugin.h"
0013 #include "pdblauncher.h"
0014 #include <executescript/iexecutescriptplugin.h>
0015 #include <execute/iexecuteplugin.h>
0016 #include <interfaces/launchconfigurationtype.h>
0017 #include <interfaces/icore.h>
0018 #include <interfaces/iplugincontroller.h>
0019 #include <interfaces/iruncontroller.h>
0020 
0021 #include "kdevpythonversion.h"
0022 
0023 namespace Python {
0024 
0025 K_PLUGIN_FACTORY_WITH_JSON(PdbDebuggerPluginFactory, "kdevpdb.json", registerPlugin<PdbDebuggerPlugin>(); )
0026 
0027 PdbDebuggerPlugin::PdbDebuggerPlugin(QObject* parent, const QVariantList&) 
0028     : IPlugin("kdevpdbsupport", parent)
0029 {
0030     IExecuteScriptPlugin* iface = KDevelop::ICore::self()->pluginController()
0031                             ->pluginForExtension("org.kdevelop.IExecuteScriptPlugin")->extension<IExecuteScriptPlugin>();
0032     Q_ASSERT(iface);
0033     KDevelop::LaunchConfigurationType* type = core()->runController()
0034                                               ->launchConfigurationTypeForId(iface->scriptAppConfigTypeId());
0035     Q_ASSERT(type);
0036     type->addLauncher(new PdbLauncher());
0037 }
0038 
0039 PdbDebuggerPlugin::~PdbDebuggerPlugin()
0040 {
0041 
0042 }
0043 
0044 }
0045 
0046 #include "pdbdebuggerplugin.moc"
0047 
0048 #include "moc_pdbdebuggerplugin.cpp"