CCFileType CCFileTypeOf(const wxString& filename)
{
const wxString file = filename.AfterLast(wxFILE_SEP_PATH).Lower();
const int pos = file.Find(_T('.'), true);
wxString ext;
if (pos != wxNOT_FOUND)
ext = file.SubString(pos + 1, file.Len());
if ( ext.IsEmpty()
|| ext == _T("h")
|| ext == _T("hpp")
|| ext == _T("tcc")
|| ext == _T("xpm") )
{
return ccftHeader;
}
else if ( ext == _T("cpp")
|| ext == _T("c")
|| ext == _T("cxx")
|| ext == _T("cc")
|| ext == _T("c++") )
{
return ccftSource;
}
else
return ccftOther;
}
The best way is that it can have a wxTextCtrl in the CC setting dialog.That's what I played around with recently. The outcome is attached... That's how it should look like (implementation is still not complete due to a lack of time).
But this I think is belong to "code completion" page, not the parser page.True, I actually had in mind to save space... I'll change it.
PS: I'm not sure our CC's parser can correctly parse java source files.You are right that it cannot really understand it, but for simple/quick matters in which it is not worth my time to open a different program, CC works well enough to be useful.
Implemented in trunk.Thank you, I will be sure to try it.
I've set the category to Lexer, is this the correct one?Yes, that is the one; thank you. (You have saved me from being bugged at seeing something out of place :).)
Probably only developers can change the 'advanced' settings of patches, bugs and features.OK.
is there any structure in place that I can use to create "on demand" code completion (similar to being able to select the lexer with Edit->Highlight mode)?No. And I think it wouldn't really make sense. However, If you change the CC options, usually the project(s) is(are re-scanned.
One question:But this I think is belong to "code completion" page, not the parser page.True, I actually had in mind to save space... I'll change it.
As we can't not multiply select many items, so even cut/paste every items in "Keyword sets to additionally include" are quite annoying. :)No, sure not. You can copy/paste by container, so e.g. by wxStaticBoxSizer.