Author Topic: [FR] path completion  (Read 2079 times)

Offline jazzer

  • Multiple posting newcomer
  • *
  • Posts: 30
[FR] path completion
« on: February 21, 2007, 08:56:40 am »
imagine I type something like
Code: [Select]
#include <shere I'd like to press Ctrl+Space and get the list of files (for example, sstream, string, etc if it's C++), which can be included according to current project settings (standard path, user search path etc).
Also I'd like to see the directories there (for example, sys, if it's UNIX).
If it's possible, for convenience, there should be icons in the list showing what's a file and what's a directory.

It could be very convenient to get full suport from the auto-complete engine while typing things like:
Code: [Select]
#include "project1_stuff/subproject2_stuff/anothersubproject3_stuff/include_file.h"
It could help a lot.

What do you think?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: [FR] path completion
« Reply #1 on: February 21, 2007, 09:01:58 am »
imagine I type something like
Code: [Select]
#include <shere I'd like to press Ctrl+Space and get the list of files (for example, sstream, string, etc if it's C++), which can be included according to current project settings (standard path, user search path etc).
That's hard. As you know those headers have often no and/or no common file extension. So one would have to offer *all* files found in *all* search path's because they could potentially be a file to include. Thinking about that sometimes users even include *.cpp files it's getting more and more complicated. Offering "all files found" (because they are actually all possible include candidates) sounds not very convenient to me.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline jazzer

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: [FR] path completion
« Reply #2 on: February 22, 2007, 02:10:19 am »
imagine I type something like
Code: [Select]
#include <shere I'd like to press Ctrl+Space and get the list of files (for example, sstream, string, etc if it's C++), which can be included according to current project settings (standard path, user search path etc).
As you know those headers have often no and/or no common file extension. So one would have to offer *all* files found in *all* search path's because they could potentially be a file to include.
Yes, you are right, it should work this way.
We could cope with too large number of possible completions as bash does (like "Display all 1547 possibilities? (y or n)"), also we could introduce a setting with max. files to show, and just show nothing is the resultset exceeds this number, and wait until user enters another letter and makes the resultset less. Also we could place to settings a list of extensions that a user wants to see in the list - as extension strongly depends on project.
There are many way to improve performance and usability.
And, actually, it depends on how user will use it. Request all possible completions doesn't make sense anyway (as well as requesting all possible completions in shell), but when you start typing a long path like in my example and don't want to type it by hand, it would help a lot.