Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Semantics Heatmaps
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jay.carlton
Ketchup Master

USA
65 Posts

Posted - Apr 14 2014 :  1:54:00 PM  Show Profile  Reply with Quote
When reading through code, one frequent task for me mentally is to determine for each statement what type of statement it is. A possible though by no means unique taxonomy might be
  • a declaration

  • an assignment

  • a condition

  • an initialization

  • a global function call

  • an error handler

  • a macro invocation

  • a non-const method call

  • an allocation/deallocation


It might be interesting to have a view mode or highlighting scheme that operated on statements instead of symbols so that I could isolate bits of code that actually potentially change the state of variables from the boilerplate.

To anticipate the first obvious objection, yes it could be noisy, and confusing to try to do this on top of the existing syntax highlighting. You might need a way to toggle the view to paint by statement type instead of by syntax. Sort of like photoshop filters, or the different helmet visor HUDs in Metroid Prime. [There might be other interesting "heat maps" you could do if you had this concept in the UI. Coloring lines by the date they were last changed, functions by complexity, objects by size, etc.]

Secondly, I understand that these categories would overlap. You'd probably want to apply a strict ordering, such that perhaps heap allocation trumps assignment, as does initialization, but that declaration without initialization is more interesting than a "safe" declaration.

Differentiating calls to local vs global vs enclosing namespace functions might be interesting as well, especially if I could then map those to dlls or units of architectural interest like components and tiers, and flag calls that violate the intent of the architecture.

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Apr 15 2014 :  1:58:27 PM  Show Profile  Reply with Quote
I am not sure where to start thinking about this.

Have you ever turned On:

VA Options -> Refactoring -> Automatically highlight references to symbol under cursor

if you turn this on, and make sure to set two distinct colours for "Highlight references using", then the symbol under the cursor will be highlighted, using one colour for reads, and a second colour where VA sees it being updated. This is the same check that Find References uses to work out which references are being updated, so they can be shown in a different colour.

Some of this exists at a file level, but some of it does not.

I am not even sure this is something that makes much sense in the editor, it almost seems more like you are after some different view / perspective on your code base.

zen is the art of being at one with the two'ness
Go to Top of Page

jay.carlton
Ketchup Master

USA
65 Posts

Posted - Apr 15 2014 :  11:19:08 PM  Show Profile  Reply with Quote
I believe I have that option on, at least when I search for things. I really like being able to see the accesses separated from the assignments, and I think it could be useful to take that capability and apply it to the whole display, perhaps temporarily turning off other highlights and styles for emphasis. It could be done on top of or alongside the syntax highlighting using nontextual symbols, shading, or markers, too.

The IDE and VA have several tools already that provide different perspectives and views on the code base: the performance analyzer rheadmap, the VA View, the include list, Annotate, formatting character display, and various outline and class diagram views. This would be another way to get one of those perspectives (or several different ones, depending on how I arranged the filters and precedence).
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Apr 16 2014 :  7:19:32 PM  Show Profile  Reply with Quote
To help you focus on this, turning Off:

VA Options -> Fonts and Colors -> Enable Enhanced Syntax Coloring

stops VA syntax highlighting, but still leaves:

VA Options -> Refactoring -> Automatically highlight references to symbol under cursor

working. That might actually be a bug, but here it works to your advantage If you want to use this quickly, you could map a keyboard shortcut to the command:

VAssistX.ToggleColoring

in the IDE keyboard settings.

We are looking into some other possible views of the code, so I have added your comments to that. This is still at the thinking about it stage though, so I am not sure if / when it will yield something interesting.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000