Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 More detailed symbol searching...

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
MrDoomMaster Posted - Mar 26 2007 : 3:46:35 PM
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!
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Mar 26 2007 : 4:01:13 PM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000