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
 Type usage overview
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2047 Posts

Posted - Sep 02 2020 :  12:54:24 PM  Show Profile  Reply with Quote
I dont think that currently there is any way in VA to have an overview of all types used in the current project file.

Its something that I needed a few times already, a kind of overview of the types used in a class, or file. Kind of like the VA View / Outline but grouped by type, showing name of variable, file, line number,

File1.cs
  + integer
  + string
  + FileInfo
    - _fi   [File1.cs (25)]
    - finfo [File1.cs (49)]
  + DataStorage
    - ds    [File1.cs (26)]


Would be a great help in understanding the current file, searching for implementations and uses of type, etc.

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Sep 02 2020 :  2:25:59 PM  Show Profile  Reply with Quote
What sort of scope are you thinking of here?

Types in a class, are you thinking of just class member variables, or all variables used across all member functions?

For the file, what sort of scope? Since you don't really have file scope variables in C#, all variables are going to be class members or "local" variables to functions, either from parameters or declared inside the functions.

What are you trying to achieve here? I am not sure I see how this helps.

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

Uniwares
Tomato Guru

Portugal
2047 Posts

Posted - Sep 02 2020 :  3:17:38 PM  Show Profile  Reply with Quote
The idea is to see what types are used through the whole file that is open (may be for a class, not sure, since a class can span multiple files, or a file can have multiple classes)

So it's not about scope but quantity.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Sep 03 2020 :  07:28:48 AM  Show Profile  Reply with Quote
OK, so every line that declares a type...

I am still not sure what you are trying to achieve here. Maybe a sense of what sort of task the file works on, by the main types it uses? But wouldn't this be unreliable, since it could do a lot of file handling, but only declare a file type once or twice?

As an initial work around, have you considered using a regular expression, which you could then sort and count the line groups of?

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

Uniwares
Tomato Guru

Portugal
2047 Posts

Posted - Sep 03 2020 :  07:44:03 AM  Show Profile  Reply with Quote
Maybe the File was a bad example. But when you have a large amount of cascading or interweaved business classes, its sometimes a real pain to get an overview which of them are used in a certain class or file. Sure, I can get a type and then see where its referenced but thats kinda-other-side-around.
When you try to understand the code in front of you, (almost) any tool is helpful.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Sep 03 2020 :  09:16:10 AM  Show Profile  Reply with Quote
So really we are looking for some form of overview of the structure of the code? VA Outline is designed to help on a file level, but this assumes / requires that everything has sensible names.

Another approach is that you want some form of code metrics, but focusing on the types used, rather than function length.

Any tool that has parsed the code has the building block information in hand to set about generating this information, but we need a clear definition of what information we want extracted, and how.

Have you considered running Find References in File on key types? You can clone the Find References Results window, so you can collect snapshots of the usage of different types this way, to get a sense of what is happening.

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:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000