List Info

Thread: Re: KDE/kdevelop/languages/cpp




Re: KDE/kdevelop/languages/cpp
user name
2007-12-07 08:13:05
On 07.12.07 14:30:35, David Nolden wrote:
> On Friday 07 December 2007 14:07:06 Andreas Pakulat
wrote:
> > I'm not sure I understand everything there. I had
thought of a simple
> > color dialog where you can just add colors to a
list, which would get
> > used for variable highlighting.
> >
> > I'm not sure complete auto-computing colors works,
Matthew Woehlke or
> > Fredrik Hoeglund would be the ones to ask about
that.
> >
> > Also having too many colors might pose a usability
problem as well, i.e.
> > making the code itself harder readable. I haven't
tested your changes,
> > so this is just me thinking out loud.
> 
> I think letting the user pick each color would be
configuration overkill.

Depends, on how many different colors there would be  As I said
I
don't think having a separate color for each variable in the
current
file makes the code more readable. But I do agree that this
will most
probably be overkill...

> The only important thing about the colors is that they
are
> distinguishable, that's why they span over the whole
range of possible
> colors. What would make sense would be an option to
choose how many
> different colors there should be(also changing the
distance of the
> colors), maybe their brightness/saturation, and whether
the
> background-color should also be changed for the
highlighting.

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

-- 
You'll feel much better once you've given up hope.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: KDE/kdevelop/languages/cpp
user name
2007-12-07 08:31:42
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

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )