Plugins depending on the standardoutputview with no Ui

Aleix Pol aleixpol at kde.org
Tue Mar 22 22:07:55 UTC 2011


On Tue, Mar 22, 2011 at 2:36 PM, Laszlo Papp <djszapi at archlinux.us> wrote:

> Hi,
>
> I have tackling an issue to get the VCS plugins in my standalone.
> pluginManager->allPluginsForExtension(
> "org.kdevelop.IBasicVersionControl" ).count() returns zero in case a
> KDevelop::Core::NoUi, but 3 (git,svn,cvs) in case
> KDevelop::Core::Default.
>
> You might need a different way to provide output in the NoUi case. The
> problem is that I do not really need Ui in my application, thus it
> would be nice to have it fixed. :)
>
> Thank you in advance!
>
> Best Regards,
> Laszlo Papp
>
> -----------
>
> [pseudocode]
> ....
> "Includes"
> ...
>
> class ConsoleIDEExtension : public KDevelop::ShellExtension
> {
>    public:
>        static void init() { s_instance = new ConsoleIDEExtension(); }
>
>        virtual QString xmlFile() { return QString(); }
>        virtual QString binaryPath() { return QString(); };
>        virtual QString defaultProfile() { return QString(); }
>        virtual KDevelop::AreaParams defaultArea(){
>            KDevelop::AreaParams params = {"code", i18n("Code")};
>            return params;
>        }
>        virtual QString projectFileExtension() { return QString(); }
>        virtual QString projectFileDescription() { return QString(); }
>        virtual QStringList defaultPlugins() { return QStringList(); }
>
>    protected:
>        ConsoleIDEExtension() {}
> };
>
> ...
>
> void VcsTool::loadVersionControlPlugin(KConfigGroup& projectGroup)
> {
>    ConsoleIDEExtension::init();
>    KDevelop::Core::initialize(0, KDevelop::Core::NoUi);
>    KDevelop::IPluginController* pluginManager =
> KDevelop::Core::self()->pluginController();
> qDebug() << "TESTPOINT1:" <<  pluginManager->allPluginsForExtension(
> "org.kdevelop.IBasicVersionControl" ).count();
>        foreach( KDevelop::IPlugin* p,
> pluginManager->allPluginsForExtension(
> "org.kdevelop.IBasicVersionControl" ) )
>        {
>            KDevelop::IBasicVersionControl* iface =
> p->extension<KDevelop::IBasicVersionControl>();
>            if( iface && iface->isVersionControlled(
> GluonEngine::Game::instance()->gameProject()->dirname().toLocalFile()
> ) )
>            {
>                m_vcsPlugin = p;
>                projectGroup.writeEntry("VersionControlSupport",
> pluginManager->pluginInfo( p ).pluginName() );
>                projectGroup.sync();
>             }
>        }
> }
>
> [/pseudocode]
>
> --
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>

Hi!
As I've said at some point in IRC, the problem here is that the
StandardOutputView plugin requires Ui. I think that we should be able to
provide some alternative to our current plugin in case we don't have UI. We
don't have the logic to decide that yet, but I think that shouldn't be very
hard to make it possible to provide NoUi-only plugins.

I'm interested in it for my static analysis system (buildtools also require
StandardOutputView through makebuilder) and I think I can do it quite
simply.
Also, having Gluon creator as a kdevplatform user opens the possibility to
have it used outside KDevelop which is something good I think, mainly
because their needs will be very close to Plasmate's, which may also benefit
from this feature.

Any thoughts against it?

Aleix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110322/bdfbe2c8/attachment.html>


More information about the KDevelop-devel mailing list