Case insensitive Identifiers

David Nolden zwabel at
Mon Feb 15 12:13:04 UTC 2010

Am Montag 15 Februar 2010 12:49:50 schrieb Niko Sams:
> Hi all (David),
> In Php class identifiers and function identifiers as case insensitive.
> Currently there are two problems
> with that:
> - QuickOpen displays the tolower version
> - I want to change code completion to use CodeModel only (for
> performance) and i'ts tolower then too
> two ideas how to solve this:
> 1. add a CaseInsensitive flag to findDeclarations
That's not possible, because the global PersistentSymbolTable does not support 
case-insensitive look-up, and it would probably be a major amount of work to 
make that work.
> 2. when showing QuickOpen/CodeCompletion items load shown declarations
At least for quick-open, this shouldn't be a problem, as it happens anyway! 
Quickopen loads all the declarations that are currently visible completely, so 
it can disambiguate multiple overloads of the same function, and such stuff. 
You'd just have to modify it so it also extract the non-tolower name when 
loading the declarations. I think the place to do this is 

> This is not easily possible with CodeCompeltion as kate uses the
> NameColumn and DisplayRole for sorting
> Any ideas how to solve this isue?
Hmm in code-completion it's more problematic, that's true. So you don't want 
to use declarations any more at all? At least in C++, the declarations are 
used anyway so they can be filtered and such, and in that case it wouldn't be 
a problem to also extract the non-tolower name at that point.

There's also a general problem when trying to use CodeModel for code-
completion: The code-model only contains one entry for multiple overloads of a 
function. That's a major pain already in the quickopen list, as the number of 
items has to be increased dynamically depending on whether a shown function 
has multiple overloads, and this will be impossible to do in code-completion.

Greetings, David

More information about the KDevelop-devel mailing list