Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
ClangComplete plugin
ollydbg:
I mean how clang can find the gcc's default search paths, different version of gcc has different paths, like:
--- Code: ---Caching GCC dir: E:\code\cb\gcc\mingw-static-4.4.5-all\lib\gcc\i686-mingw32\4.4.5\include\c++
Caching GCC dir: E:\code\cb\gcc\mingw-static-4.4.5-all\lib\gcc\i686-mingw32\4.4.5\include\c++\i686-mingw32
Caching GCC dir: E:\code\cb\gcc\mingw-static-4.4.5-all\lib\gcc\i686-mingw32\4.4.5\include\c++\backward
Caching GCC dir: E:\code\cb\gcc\mingw-static-4.4.5-all\include
Caching GCC dir: E:\code\cb\gcc\mingw-static-4.4.5-all\lib\gcc\i686-mingw32\4.4.5\include
Caching GCC dir: E:\code\cb\gcc\mingw-static-4.4.5-all\lib\gcc\i686-mingw32\4.4.5\include-fixed
--- End code ---
Does clang has it's own include files so that we do not need mingw's ?
Lalaland:
No, you are right, it is using gcc's search directories.
It seems that it can search a limited number of hardcoded paths for the headers(there is a whole complex module for this, tons of switch statements and "// FIXME: temporary hack: hard-coded paths.") , eg
--- Code: --- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.5.0");
AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.4.0");
AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.3.0");
--- End code ---
which is why it seems to work, but I actually need to find the real paths to get it working when Mingw is not installed in the usual locations ...
Lalaland:
How does codeblocks filter results completions that are not related to a container(Ie, does not '->', '.' or '::')
With no container, you get hundreds of possible completions.
Should I filter and show only variables, only functions, ?
Showing all possible completions causes observable delays, and the resulting list is too large to use.
Also:
How useful is it to users to have the icon also show accesability(private, protected, etc)?
While it is possible with clang(the functions are there) it seems that I would have parse the file twice in order to get this kind of type information.
ollydbg:
--- Quote from: Lalaland on November 14, 2011, 07:57:54 am ---How does codeblocks filter results completions that are not related to a container(Ie, does not '->', '.' or '::')
With no container, you get hundreds of possible completions.
--- End quote ---
You mean the current implementation in Codeblocks? As far as I know, it dose not filter any thing, but note that the "auto-completion" should be only triggered by:
1, after "->", "::" or "."
2, after user continuously entered four characters, so we do a prefix match of four chars, and only list the tokens which have the same prefix string. note: the value "four" can be configured to "two" or even "one", which means more Tokens will be listed, but we have a limit value (like 10000).
3, when the user continuously enter some more characters, we just use the result in the step 2.
--- Quote ---Should I filter and show only variables, only functions, ?
Showing all possible completions causes observable delays, and the resulting list is too large to use.
--- End quote ---
The best way is show automatic variable firstly, and then class members, then global variables....So, I think the Tokens from clang should be sorted. :D
--- Quote ---Also:
How useful is it to users to have the icon also show accesability(private, protected, etc)?
While it is possible with clang(the functions are there) it seems that I would have parse the file twice in order to get this kind of type information.
--- End quote ---
Yeah, this is much better!
Folco:
My personal opinion : I don't use these pictures. The names I choose are explicit, and I never learned the meaning of these symbols.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version