Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Suggestion: Using ctags & sqlite for code completion
takeshimiya:
Eran: Amazing, is all I can say.
I'm trying to compile it with GCC, I'll let you know if I get stuck.
UPDATE:
I could compile & link CodeLite without errors :D (but with 300 warnings, mostly "defined but not used variables" and "dllimports" warnings).
I could compile & link LiteEditor with all it's dependencies, except wxFlatNotebook, since it's missing the implementation (wxFlatNotebook.cpp), and it appears to be different to the one in SourceForge and the one shipped in C::B.
I've tried first to compile in UNICODE mode but I failed, there are errors regarding conversions between char* and wxStrings specially in the ctags_manager.
In ANSI mode I didn't have to touch any line of code to get it to compile successfully in C::B/GCC .
Suggestion: can you remove the wxControls dependency? I know they're nice, but they're not necessary in this case (and the debug version weights 15mb). With wxScintilla and wxFlatNotebook is enough for demoing purposes.
The most serious issue is Unicode: I guess the conversions between ASCII<->UNICODE will be necessary in Ctags since I doubt it supports unicode, but I wonder if saving the DB in ANSI would be good. (In a dream world Ctags would support unicode tags and filenames).
Now on the library itself:
Wow it's very fast, ~2 seconds for parsing the entire C::B SDK and ~1 second for opening the DB. :)
And the tree symbol seems to be correct, I didn't found nothing missing at first glance (except inherited members?).
As for the WordCompletion, it seems to work ok for the most cases :D, but I get usually 0 matches with local scope variables.
Aside from that, something that would really want to have, is comment parsing, along with (simple) doxygen parsing.
Something like this:
For CodeCompletion
"Hovering tooltips"
And for the Tree view
Honestly these are the only things I still miss from the days of Visual Studio + Visual Assist X.
tiwag:
can you post the cb project file please
eranif:
--- Quote ---Suggestion: can you remove the wxControls dependency? I know they're nice, but they're not necessary in this case (and the debug version weights 15mb). With wxScintilla and wxFlatNotebook is enough for demoing purposes.
--- End quote ---
Sure no problem, I forgot about their size ... (i uploaded the whole thing from work where I have high upload bandwidth)
--- Quote ---I've tried first to compile in UNICODE mode but I failed, there are errors regarding conversions between char* and wxStrings specially in the ctags_manager.
--- End quote ---
I didnt try to build it with UNICONDE, since I am not very familiar with it, if you can provide me with guidelies, I will be happy to do it
--- Quote ---I didn't found nothing missing at first glance (except inherited members?)
--- End quote ---
Thanks for reminded me of that, I knew I forgot something :lol:
I did prepared the infrastrcutre to support it (look at the database at the table strcuture, you will see there column for it already and it is populated where there is a match), anyway, should be easy to add (just run some more querys on the database)
--- Quote ---As for the WordCompletion, it seems to work ok for the most cases Very Happy, but I get usually 0 matches with local scope variables.
--- End quote ---
Can you give me a sample source file where it does not work?, the local scope does not support (currently) function arguments
Hovering tips - the library already supports it, its just that the demo does not
show how to use it (check out funtction at Language::ProcessExpression, it does all the work)
Adding combos above the tree view - is easy (unless you meant that you want me to add to the library a control for that,
like i did with symbol_tree):
to fill up the combox values run:
'select * from tags where kind in('class', 'struct', 'union');
for each result you can run (when it is selected from the combobox):
std::vector<TagEntry> tags;
TagsManagerST::Get()->TagsByParent(className, tags);
Parsing comments, well, I think there is a more useful feature before that, that you didnt mention:
symbol browsing from the editor, if you worked with vslick it is Ctrl+. or Ctrl+, in visual studio, right click->Go to definition
very useful feature, and very easy to implement it once you have SQL database of all tags.
Eran
takeshimiya:
--- Quote from: tiwag on August 29, 2006, 03:59:03 pm ---can you post the cb project file please
--- End quote ---
Of course, will commit when I get the missing files.
--- Quote from: eranif on August 29, 2006, 04:46:45 pm ---
--- Quote ---Suggestion: can you remove the wxControls dependency? I know they're nice, but they're not necessary in this case (and the debug version weights 15mb). With wxScintilla and wxFlatNotebook is enough for demoing purposes.
--- End quote ---
Sure no problem, I forgot about their size ... (i uploaded the whole thing from work where I have high upload bandwidth)
--- End quote ---
Remember also that the wxFlatNotebook implementation is missing.
--- Quote from: eranif on August 29, 2006, 04:46:45 pm ---I didnt try to build it with UNICONDE, since I am not very familiar with it, if you can provide me with guidelies, I will be happy to do it
--- End quote ---
It's really easy.
For compiling the wxWidgets library you would normally issue the command mingw32-make -f makefile.gcc
For compiling the UNICODE version just add the parameter UNICODE=1
Example:
--- Code: (bash) ---set path=C:\MinGW\bin;C:\mingw\mingw32\bin
cd C:\wxWidgets-2.6.3\build\msw
mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
--- End code ---
For using it in the makefile, since I noticed you're using my tool, you'll only need to change to the resulting directory
as in WXCFG=gcc_dll\mswud.
For fixing the code reading this article might help: http://wiki.codeblocks.org/index.php?title=Unicode_Standards
--- Quote from: eranif on August 29, 2006, 04:46:45 pm ---I did prepared the infrastrcutre to support it (look at the database at the table strcuture, you will see there column for it already and it is populated where there is a match), anyway, should be easy to add (just run some more querys on the database)
--- End quote ---
And add a checkbox somewhere to toggle inherited members viewing off, since sometimes is useful to toggle it off.
--- Quote from: eranif on August 29, 2006, 04:46:45 pm ---
--- Quote ---As for the WordCompletion, it seems to work ok for the most cases Very Happy, but I get usually 0 matches with local scope variables.
--- End quote ---
Can you give me a sample source file where it does not work?, the local scope does not support (currently) function arguments
--- End quote ---
So that was, I was trying function arguments and they didn't worked. But I found other local scope variables that doesn't works.
I'll point later the failing cases (I'm testing it mainly with parsing the C::B SDK).
--- Quote from: eranif on August 29, 2006, 04:46:45 pm ---Adding combos above the tree view - is easy
--- End quote ---
Oh no, ignore the combos part, I was pointing the tooltips in the tree with comments/documentation being shown.
--- Quote from: eranif on August 29, 2006, 04:46:45 pm ---Parsing comments, well, I think there is a more useful feature before that,
--- End quote ---
Hehe, it's arguable the usefulness since with tooltips you don't even need to click and open the file (which might be even missing from disk but present in the DB?).
--- Quote from: eranif on August 29, 2006, 04:46:45 pm ---that you didnt mention:
symbol browsing from the editor, if you worked with vslick it is Ctrl+. or Ctrl+, in visual studio, right click->Go to definition
very useful feature, and very easy to implement it once you have SQL database of all tags.
--- End quote ---
It's really useful but I didn't asked, since I taked it for granted (as current C::B CodeCompletion haves the "Go to definition/declaration" feature). :P
I've sent you a mail with more info. :)
tiwag:
--- Quote from: Takeshi Miya on August 29, 2006, 05:26:54 pm ---
--- Quote from: tiwag on August 29, 2006, 03:59:03 pm ---can you post the cb project file please
--- End quote ---
Of course, will commit when I get the missing files.
--- End quote ---
how did you build it then as you've posted before ?
--- Quote from: Takeshi Miya on August 29, 2006, 10:55:38 am ---UPDATE:
I could compile & link CodeLite without errors :D (but with 300 warnings, mostly "defined but not used variables" and "dllimports" warnings).
I could compile & link LiteEditor with all it's dependencies, except wxFlatNotebook, since it's missing the implementation (wxFlatNotebook.cpp), and it appears to be different to the one in SourceForge and the one shipped in C::B.
I've tried first to compile in UNICODE mode but I failed, there are errors regarding conversions between char* and wxStrings specially in the ctags_manager.
In ANSI mode I didn't have to touch any line of code to get it to compile successfully in C::B/GCC .
--- End quote ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version