GenericProjectManager improvements

Andreas Pakulat apaku at gmx.de
Fri Oct 3 20:54:58 UTC 2008


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.

> 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. 

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.

> 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.

Andreas

-- 
You have many friends and very few living enemies.




More information about the KDevelop-devel mailing list