Bug 140901 - Option to add new files to project when created outside the IDE
Summary: Option to add new files to project when created outside the IDE
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: Custom Makefiles (show other bugs)
Version: 3.4.0
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-30 16:32 UTC by Frederic Heem
Modified: 2007-03-06 02:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Heem 2007-01-30 16:32:34 UTC
Version:           3.4.0 (using KDE 3.5.5-3.el4, CentOS release 4.4 (Final))
Compiler:          gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)
OS:                Linux (i686) release 2.6.9-42.0.4.EL

When creating a file outside the IDE, the "quick open" window does not show the new file.
A workaround is to close kdevelop, delete myproject.kdevelop.filelist and start  restart kdevelop.
Comment 1 Andreas Pakulat 2007-01-30 17:00:13 UTC
Uhm, how should kdevelop know about files that are created outside of itself? How should kdevelop know it needs to be part of the project?

Apart from the fact that you can add any file in the FileTree view to the project.
Comment 2 Frederic Heem 2007-01-30 18:47:38 UTC
kdevelop is already smart enough to find out if a file has been modified outside the IDE.
Is it possible to watch a directory for newly created files ? 
Some subdirectories some mime-type shall be excluded from being watch, for instance the build directory where cmake puts every generated files.
Another simple approach is to add a button to refresh the whole content of the project, like when a project is imported.
Comment 3 Andreas Pakulat 2007-01-30 19:08:49 UTC
Its not about watching a dir (which doesn't always work reliable and might cause crashes because some of the underlying watch-systems are pretty buggy). Its about KDevelop not being able to read your mind, how should it know that you want a specific file added to the project? I create quite some new files inside project dirs which should never be added, building a project in-source does so too.

filelist-refreshing would be the same thing too. The only thing that it could do is remove non-existent files from the project.
Comment 4 Andreas Pakulat 2007-01-30 19:59:20 UTC
Ok, reopening the wish, updating the title. 

It might make sense for the custom project to ask the user wether it should add a new file to the project.

I might implement this in march, as I have plans to improve custom in other ways to ease the KDE4 development.
Comment 5 Andreas Pakulat 2007-01-30 19:59:50 UTC
Moving to custommakefile component
Comment 6 Andreas Pakulat 2007-03-06 02:13:19 UTC
Ooops, forgot the BUG: again :(

I just implemented a hopefully not too intrusive way. KDevelop now watches all directories in the project for changes and automatically removes files from the projectlist that don't exist anymore.

As for adding newly created files there's a new menu item in the project menu which allows to view a tree of paths and files that were recently added to the project and then choose which of these should be added to the project.