Hello,
Here is a patch for the codecompletion plugin,
that tries to improve the include file completion.
Improvements:
1. Parse correctly:
# include "ala-bala"
# include "ala-bala"
2. Use the project/active target include dirs to simplify the entries in the auto-complete list.
In my projects, I always put the source (*.h/*.cpp) files in subdirectory "src" and add it as an include path to the projects.
This let me use the headers without the "src/" prefix.
In the patch, the file path is modified, so it doesn't start with the include dir (the dir is stripped from the path).
So I can type the file path relative to the src directory and the completion list has the correct entries.
I've tested it only on linux and I need some help to handle paths in platform independent way (handle paths with \ instead of /)
Also I'm not sure how to handle ./ or ../ added to include dir. Any help here will be appreciated
#include "file1.h"
#include "dir1/file2.h"
3. Fixed a bug in the usage of the "caseSens" option
- ed->GetControl()->AutoCompSetIgnoreCase(caseSens);
+ ed->GetControl()->AutoCompSetIgnoreCase(!caseSens);
KNOWN PROBLEM:
The closing '"' or '>' is not added automatically and I couldn't find a way to implement it.
If anyone knows (and shares this info) if there is a message, that I can handle to add the one of the two characters, I'll be very thankful.
Best regards
p.s. the patch is attached
p.s.s. the patch is made against the 5617 wxaui branch
[attachment deleted by admin]