Colored procedures in procedure browser

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Colored procedures in procedure browser

Post by PB »

It's often hard to spot a particular procedure in the procedure browser, so
I was thinking it'd be nice if we could color them in the list? To do it, I was
thinking the editor could check if the "Procedure" line was followed by a
special comment, and if the comment existed, then color it in the browser.

Something like this perhaps?

Code: Select all

Procedure FlushEvents() ; [R,G,B]
  While WindowEvent() : Wend
EndProcedure
So the editor would see that a color code is commented, and apply that color.
So to have it show the above in green in the browser, the programmer would
just put a comment of [0,255,0] after the procedure line, as the comment.

It wouldn't affect anyone's existing code and wouldn't color any procedures
that didn't specifically have that style of comment. It would make it easier
to have groups of related procedures seen in the browser, too, because I
could color all my file op procedures in red, and so on.

Here's an example image of what I mean:

Image
.
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

Post by mskuma »

Nice idea. Might be better realised with a right-mouse click on the procedure name in the browser to produce a menu to set (via a picker)/clear a colour for the listing in the browser. It might be worthwhile to extend this (as a separate option) to colourise the background of the source code itself to help it stand out as you're scrolling up and down in the source.
#NULL
Addict
Addict
Posts: 1497
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Post by #NULL »

there was a similar request in the german forum (link) but i would not realy need that. may be i would use if it was there finally :lol:
usually i have different files for different categories of routines anyway.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> i would not realy need that

When the procedure browser has hundreds of procedures shown, it gets
difficult to spot the one you're looking for. I'm currently using workarounds
such as capitalizing procedure names, and sticking lines like ";------" in the
source to make them more obvious, but colors would be the best way.
#NULL
Addict
Addict
Posts: 1497
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Post by #NULL »

ok, probably my previous projects are just small enough to cope with that.
i never had hundreds of procs in a file. could be usefull then.
User avatar
Blood
Enthusiast
Enthusiast
Posts: 161
Joined: Tue Dec 08, 2009 8:34 pm
Location: United Kingdom

Re:

Post by Blood »

PB wrote:> i would not realy need that

When the procedure browser has hundreds of procedures shown, it gets
difficult to spot the one you're looking for. I'm currently using workarounds
such as capitalizing procedure names, and sticking lines like ";------" in the
source to make them more obvious, but colors would be the best way.
OOP would cure this! :wink:
C provides the infinitely-abusable goto statement, and labels to branch to. Formally, the goto is never necessary, and in practice it is almost always easy to write code without it. We have not used goto in this book. -- K&R (2nd Ed.) : Page 65
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Colored procedures in procedure browser

Post by freak »

Reviving a 4 year old topic for a cheap trolling attempt. You should be proud of yourself.
quidquid Latine dictum sit altum videtur
Locked