Colored background to help visualize structure

Dear JetBrainers,

as many of my GUI-related classes tend to keep getting complex (loads of
event handlers, properties, ...), I try to keep structure by creating
#regions around the various parts of my classes (#regions for fields,
construct, destruct, build (constructs the gui), properties, events,
eventhandlers, ...). As VS keeps regions closed upon opening files this
helps me in finding the structure a lot.

I just had an idea how to even enhance this, though. I don't know
whether you know the extension "Quote Colors" for Mozilla Thunderbird
(http://quotecolors.mozdev.org/), if not please have a look at the first
screenshot on that page. That might be a good idea to have in Resharper...

Every time a new level of encapsulation is opened, the background color
gets a lottle bit darker. This way, blocks in large methods are easily
recognized (Which f*** block is closed by this "}"), maybe the hue of
the background color could even hint to the kind of block ("if" blocks
are slightly red, else blocks slightly red, event handlers could be
yellowish and properties brownish). Of course one has to see whether
this does not make my source code look like this:
http://www.learnit.com/Samples/FrontPage/FrontPage%202002/Module%2003/bad.gif

But generally, I think this would be very helpful.

What do you think?

Alexander Reifinger

1 comment
Comment actions Permalink

Thanks for your suggestion. We'll think about something like this.

Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Dear JetBrainers,

as many of my GUI-related classes tend to keep getting complex (loads
of event handlers, properties, ...), I try to keep structure by
creating #regions around the various parts of my classes (#regions for
fields, construct, destruct, build (constructs the gui), properties,
events, eventhandlers, ...). As VS keeps regions closed upon opening
files this helps me in finding the structure a lot.

I just had an idea how to even enhance this, though. I don't know
whether you know the extension "Quote Colors" for Mozilla Thunderbird
(http://quotecolors.mozdev.org/), if not please have a look at the
first screenshot on that page. That might be a good idea to have in
Resharper...

Every time a new level of encapsulation is opened, the background
color gets a lottle bit darker. This way, blocks in large methods are
easily recognized (Which f*** block is closed by this "}"), maybe the
hue of the background color could even hint to the kind of block ("if"
blocks are slightly red, else blocks slightly red, event handlers
could be yellowish and properties brownish). Of course one has to see
whether this does not make my source code look like this:
http://www.learnit.com/Samples/FrontPage/FrontPage%202002/Module%2003/
bad.gif

But generally, I think this would be very helpful.

What do you think?

Alexander Reifinger



0

Please sign in to leave a comment.