A few questions about project manager

Alexandre Courbot gnurou at gmail.com
Fri Mar 30 02:22:41 UTC 2012


Hi Milian, thanks for your answer!

>> * I need to reparse the whole project whenever the its configuration
>> changes because some include directories may have added/removed. How
>> can I achieve that? Right now the parsing of the kernel configuration
>> is done by and overload of the import() method of
>> AbstractFileManagerPlugin, which is definitely not the right place.
>> More generally, how can I trigger a reparsing the whole project or
>> some of its files?
>
> You can connect to the KDirWatch returned by projectWatcher. When it emits
> dirty() for your Makefile, trigger a reload?

Yup, that's what I thought - my question was more about, how to
trigger that reload? Is there a signal for that? Or a method of the
project manager to call?

> Also, you should try to cleanup the code such that it does not call
> projectClosing(project); in import() - that looks hackish/wrong. instead,
> reload the current project such that it removes obsolete files and adds new
> stuff, but keeps previously added things that are still valid. somewhat more
> complicated, but much better I think. (project state is kept that way e.g.)

You're right - there are actually many things that are hackish right
now, mostly because I got the project manager/builder model totally
wrong. I need to rethink the whole thing now that I understand it
better.

>> * Until recently, my project configuration dialog had two panes: the
>> one I wrote, and the one for make that allowed to set things like the
>> number of parallel processes for compilation. However, the make pane
>> is gone when I compile against the latest KDevelop git. Any idea about
>> how I can get it back?
>
> add org.kdevelop.IMakeBuilder to X-KDevelop-IRequired in your .desktop file -
> if that does not work, ping me and I'll fix it.

That did it, thanks - at the same time I am thinking about using the
MakeBuilder (through its IMakeBuilder interface) instead of my own
builder job. Only thing is that to support kernel building I need to
either pass several targets to build (instead of one, the only
currently supported behavior), or to be able to modify its
environments variables. Right now the IMakeBuilder interface allows
none of this - would that be acceptable if I extended it a little to
support one or both of these behaviors?

Thanks,
Alex.




More information about the KDevelop-devel mailing list