KDE/kdevelop/languages/cpp

David Nolden zwabel at googlemail.com
Fri Dec 7 14:31:42 UTC 2007


On Friday 07 December 2007 15:13:05 Andreas Pakulat wrote:
> IMHO that last one is not a good idea. Changing the background color for
> all those variables to something different than the rest of the file
> creates too much "highlighting" and gets in the way when trying to read
> the code. Rather try to find colors that contrast with the current
> background to a certain amount. (IIRC kdeui has a function which returns
> the contrast between two colors).
>
> That reminds me: Did you look at how Eclipse does this? They only
> highlight the usages of the current variable (or last one you had the
> cursor on). IMHO that makes more sense as it doesn't produce as much
> color-clutter, but still allows to easily see where a variable is used.
>
> Andreas

I haven't looked at eclipse about that, but that's exactly what the use 
highlighter plugin does(highlight specially what's under the cursor).

The color-clutter isn't that bad, because only local variables are 
highlighted. Imo that highlighting does make sense, it makes the code more 
readable. I like it, and not just because I've written it, in the beginning 
it was just an experiment. :) The important thing is just that the colors are 
not too disturbing, that's why they are hand chosen.

greetings, David




More information about the KDevelop-devel mailing list