Removing KDevelop::ILanguage class/interface?

Aleix Pol aleixpol at kde.org
Mon Dec 29 21:05:58 UTC 2014


On Mon, Dec 29, 2014 at 4:34 PM, Kevin Funk <kfunk at kde.org> wrote:
> Heya,
>
> Stumbled upon the ILanguage <-> ILanguageSupport separation a couple of times
> already and was wondering why ILanguage is there at all...
>
> It currently provides
> - a name (which is deduced from ILanguageSupport::name)
> - a parseLock (which could be moved to ILanguageSupport)
> - a pure-virtual 'activate' and 'deactivate' method
>
> ILanguage is only inherited once, by 'Language', and instantiated inside the
> LanguageController. Language::{activate, deactivate} does nothing.
> LanguageController also provides access to all available ILanguages via
> methods like 'languagesForUrl', etc.
>
> So, my question: Why is ILanguage here? Can we remove it?
>
> Proposal:
> - Get rid off ILanguage
> - Replace uses of it with ILanguageSupport directly, remove the indirection
> - There are only a few uses of ILanguage in external plugins,
>   which are easy to fix
> => Simplifies quite a bit of code

I never really understood the difference either.
+1 to the change, from my relative ignorance.

Aleix


More information about the KDevelop-devel mailing list