GenericProjectManager improvements

Niko Sams niko.sams at gmail.com
Fri Oct 3 21:25:06 UTC 2008


On Fri, Oct 3, 2008 at 10:54 PM, Andreas Pakulat <apaku at gmx.de> wrote:
> On 03.10.08 22:31:14, Niko Sams wrote:
>> 1. detect filesystem changes (new files, files removed)
> Make sure to not watch about too many things, this can slow down things and
> it can lead to some watchings not done at all, because at least one
> implementation of kdirwatcher (inotify) has a maximum number of watchable
> files/dirs.
Can't I watch a folder recursively? WatchMode::WatchSubDirs

>
>> 2. refresh
>> Where should I implement this? Other ProjectManagers need such a functionality
>> too - if they display files in the filesystem.
>
> What do you mean with "refresh"? We already have support to reload the
> model of a project. We of course need to make this more fine-grained. In
> theory its possible to simply delete an item of the project tree and re-add
> a new one.
>
>> And how can I add a refresh action to the context-menu? I think this would make
>> sense for other ProjectManagers too.
>
> Well, CMake support already has some reloading support, because it has
> language support and hence reloads when one edits a CMakeLists.txt.
Yes - but it just detects changes in CMakeList.txt. If a .h file is
added it doesn't show up.

> Adding an action to a context menu can be done by simply implementing the
> contextMenuExtension method in your plugin. I think the project group would
> be good for this action.
which plugin? ProjectManagerView?

>> 3. easy way to add folders/dir in the ProjectMangerView
>> I would add this to the ContextMenu in the ProjectManagerView and
>> call addFile/addFolder. Is this the best way? (Would also be avaliable
>> for all ProjectManagers - though none has addFile/Folder implemented yet)
>
> Yeap. Thats exactly what I'm planning since a long time.
>
> BTW: Are you aware that quanta already has a project manager thats based on
> a list of known files stored in a filelist-file. Not sure what Andras plans
> were with that though.
I spoke with Andras about that - and we decided to use the generic one. Quanta3
does have a xml-file where all files in the project are listed, but
this is not very
user friendly (and slow) - as you have to rescan for new files. The
one in Quanta4 does basically
just load the old xml files.

Niko




More information about the KDevelop-devel mailing list