For the UI I thought it would be more reliable to trust the Lexer:
* C++ std headers have no extension
* Python scripts on unix are often missing an extension (they do usually have shebang and so could be inferred)
* As Rick has mentioned to me in the past, CC can be used for C like languages, hence we dont want to just restrict CC to C/C++
* The user can switch the highlight mode of a file. When they do i think their intent should be respected by CC.
* Note that i dont think either patch affects what the parser parses, just the files it offers a UI for. CC has a UI to control the parser i think.
So how about a more refined version. Each plugin has public member bool IsProviderFor(cbEditor *ed). That can do whatever checks that plugin prefers. For CC itself, since it is fallback, its method would be
For each CC plugin instance except me:
if Plugin.IsProviderFor(ed):
return false
return true