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
 More detailed symbol searching...
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MrDoomMaster
Tomato Guru

251 Posts

Posted - Mar 26 2007 :  3:46:35 PM  Show Profile  Reply with Quote
So far I have not been able to find a way to sort symbols in VAX by 'type'. For example, I want to be able to view all global variables in the project. I also want to be able to view all static global variables, static member variables, etc.

Here's the following categories I would like to sort by:

- Static Member Variables & Functions
- Static Global Variables & Functions

Additionally, you could make this feature much more extensible by allowing the following other features and filter types:

- Allow one to search for symbols in any specific filter (search through only global symbols, for example).
- Other suggested filters:
+ Globals
+ Filter by type (int, long, float, etc (even custom types not native to C++))

This feature would be specifically useful to me because the platform I'm coding for cannot allocate heap at stack initialization time. For example:

static std::string myVar("test");

The above would crash the program because at the point in the application where the stack is being initialized, the std::string object would be allocating memory on the heap and crash the application. Since I'm working with a very large code-base, I really have no way of getting a list of all of the static globals in the application. The closest I can get is by using the class view sidebar.

Let me know what you guys think of adding filters to the "find symbol in workspace" window. A simple combo box that allows you to narrow down the initial list of symbols in the dialog, so you can search for what you want in a given category.

Thanks for reading!

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Mar 26 2007 :  4:01:13 PM  Show Profile  Reply with Quote
We are considering allowing basic filtering based on type, etc, in the FSIW dialog:

case=5031

however I am not sure when, or even if, this would be done. Assuming for the moment this is done, I am not sure it would help you, since you have very specific requirements in this case.

I am wondering if instead some form of regular expression search is the way forward. I assume you need to locate and fix all such variables?

At a crude level, if you write a regular expression to search for a "function block", perhaps (and this is off the top of my head, using the VS2003 extensions)

^(:b*:i*:b*)*\\n\\{.*\\}

you could remove all functions from a copy of your code base. This might also remove all classes and structures. Now remove include lines and comment blocks, merge the files together, sort and unique to get rid of white space, and you have a list of global variables.

Nasty, but I have done similar jobs in VIM on various occasions. When doing this UNDO is definitely your friend, since getting the right regex can take a few attempts.

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