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
 Technical Support
 Get the statistic info about the source code.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

alanchen
Junior Member

11 Posts

Posted - Sep 12 2014 :  8:38:48 PM  Show Profile  Reply with Quote
Does Visual Assist support to display the statistic info about my visual studio 2008 project, for example:

1. Number of source codelines
2. Number of comment llines.
3. Number of functions.
4. Number of classes.

etc.

feline
Whole Tomato Software

United Kingdom
17567 Posts

Posted - Sep 12 2014 :  8:44:03 PM  Show Profile  Reply with Quote
Unfortunately not really, no. We are interested in working out what a symbol "means", rather than counting them. You can get some information, on a symbol by symbol basis by using some of our features, but they are not designed to give you the sort of overview you are talking about here.

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

alanchen
Junior Member

11 Posts

Posted - Sep 18 2014 :  09:17:34 AM  Show Profile  Reply with Quote
Do you offer an API so that I can access the parsed info by Visual Assist?
Go to Top of Page

foxmuldr
Tomato Guru

USA
316 Posts

Posted - Sep 18 2014 :  11:07:31 AM  Show Profile  Reply with Quote
quote:
Originally posted by alanchen

Do you offer an API so that I can access the parsed info by Visual Assist?



VAX does not offer an API. I have asked for this before on more than one occasion, but they have had no plans to add one since at least 2007 when I first asked, and in 2012 when I asked again. I did get further the second time. I told them perhaps in five more years I would finally get it. We'll see.

-----
You can use this RegEx to find out how many lines there are. This will exclude comments and blank lines in C/C++ code:

^~(:Wh@//.+)~(:Wh@\\{:Wh@)~(:Wh@\\}:Wh@)~(:Wh@/#).+


Do a "Find all in solution" and it will show you every line, and the number of matches will be your SLOC. It does not provide other statistics though. I found that RegEx from a Stack Overflow question where someone asked the same thing you asked here ... an easy way to get some stats.

Perhaps the VAX folk could add a function to execute this search internally to a private find area, and then dump the results after obtaining the count to give you at least one metric. Finding other RegEx to find other things shouldn't be too hard, and they could use those for the other statistics.

There are other plugins for Visual Studio which probably offer this information.

Best regards,
Rick C. Hodgin

Edited by - foxmuldr on Sep 18 2014 11:10:28 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17567 Posts

Posted - Sep 19 2014 :  12:05:20 AM  Show Profile  Reply with Quote
Sadly we still don't have any plans to offer any form of API. Put it this way, Microsoft removed the macros from the IDE since in general people did not use them. I did use IDE macros, so I didn't like this decision, but I do understand it. Suggesting on the forum you can use an IDE macro to solve a problem met with total silence nearly all of the time.

VA does not need to count the number of lines in files, or the number of comment lines, this has no baring on what we are interested in, so you could not even ask us, currently, for this information. Since these numbers won't really change very quickly a tool just to report these numbers would only need to be run every week or so.

If you want the number of files in your solution, or the number of members in a class, you can get specific numbers by using the Open File or Find Symbol dialogs, and looking at the numbers in the title bar as you filter the dialogs, to see how many items match your filter.

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