Developing the Linux kernel with KDevelop

Aleix Pol aleixpol at kde.org
Thu Sep 29 23:40:12 UTC 2011


On Fri, Sep 30, 2011 at 1:04 AM, Alexandre Courbot <gnurou at gmail.com> wrote:

> > > I know how to add it as well as the necessary widgets, and how to query
> it
> > > using KSharedConfig. The problem is that in order to obtain the
> > > KSharedConfig for the project, I need to pointer to the project itself
> -
> > > and this seems to be hard to obtain from the C parser.
> IncludePathResolver
> > > has no such link, neither do IncludePathComputer, which makes sense at
> > > that level. Higher we have CppLanguageSupport and CppParseJob, but
> there
> > > also I failed to find a chain up to the project. I would like to avoid
> > > having to go way up and to pass a parameter down to
> IncludePathResolver,
> > > did I miss a link to the current project somewhere, or is there a way
> to
> > > obtain it from inside the parser?
> >
> > Get it via the project controller, i.e. findProjectForUrl() should do
> fine -
> > or?
>
> Looks good, and I could use that if nothing better comes to mind, but
> what if the same URL points to a file that belongs to several opened
> projects? Granted, there is little chances for that to happen, but
> just in case there is another way to get the project for which the
> parse job has been triggered.
>
> Alex.
>
> --
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>

Hi,
You can ask the project controller for all projects instances and then ask
all of them if the project contains the file with IProject::inProject.

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


More information about the KDevelop-devel mailing list