Summary: | adding #include directive gui | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Vinay Khaitan <vkhaitan> |
Component: | Language Support: CPP (old) | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | david.nolden.kde |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Vinay Khaitan
2005-08-13 12:20:15 UTC
There are already bookmarks you can use to go back to your work position. So you can: -bookmark -go to the top of the file -add the includes -go back to the bookmarked position There is a nice technote on the kdevelop.org website about "efficient code navigation". If gives you other tricks you can use. This is a partial solution to extremely annoying trouble. When we go to top, we find the normal copyright notice. so navigate through cursor to the position, where we want to include the file? then go back to bookmark, and dont forget to delete bookmark after that. Okay, we can bookmark the include position too, but still this is minimum 4 step process. If extremely useful feature like this requires this much step, then why do we have "Quick OPen" dialogs? that is also possible in maximum 4 steps too? What is needed actually is that, A dialog, which scans all the #includes, then presents a dialog which lists all the includes and present possibility of adding, deleting etc. Please, this is very easy thing. And as one kdevelop developer also suggested, including can be automatic based on persistent code completion database. This is very useful feature. Thanks > Please, this is very easy thing.
I do not think so. What happeds with the #if def ... else directives ?
How do you propuse to treat those ?
I suppose that you are asking for following condition.. #ifdef _X11 #include <something.h> #else #include <something_else.h> #endif To make implementation easy, you can omit all the #ifdef includes and only present with possibilites about those, which are directly included. Those with #ifdef will have to edited manually. But if you want to implement that too, scan for ifdefs too, and present in the dialog like this... #ifdef _X11(QLabel) |---------------------| | ListBox | |---------------------| #endif (all ifdefs like this) Then in the last, direct includes. Can you help us implement it ? I sincerely hope that this comment was not to show me that this is not easy to implement. I thought myself once about crreating a plugin for kdevelop to do this. But because I have never developed for kdevelop and I am doing something else, I didn't want to get involved into it. Thanks, if you implement it... valid wish and could be really helpful. Not sure when this is going to happen though. I consider having a special GUI not very useful, the editor is a GUI after all, why have the same once again? And for the basic problem, automatic adding of include-directives is implemented in KDevelop4. So if you have QString|<invoke code-completion> You will get an entry in the completion-list that says "Add #include <qstring.h> for class QString". |