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
 Search enum elements by their const values
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Alek86
Junior Member

Canada
20 Posts

Posted - Oct 03 2013 :  10:35:08 AM  Show Profile  Reply with Quote
A problem which it will solve:

We have a large application with a database. And there are many tables, which have integer columns like RuleType, Platform, TypeId etc.

In our C++ code they are mapped to enums, which not always have same names and are located in different .h files.

And if I need to find what 388 in the current row in the database means, sometimes I need to spend a couple of minutes, because enums in C++ can be like this:


enum InternalPlatform
{
....
 Platform1 = 385,
 Platform2,
 Platform3,
 Platform4,
....
};


It would be much easier to use a special search window which will show all enum elements in the solution, which value is 388.

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Oct 03 2013 :  1:18:43 PM  Show Profile  Reply with Quote
This makes sense, and I do see your problem here. I have encountered the same effect when looking up const values. I have put in a feature request, to see what our developers make of it:

case=77335

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

Alek86
Junior Member

Canada
20 Posts

Posted - Feb 06 2015 :  1:58:23 PM  Show Profile  Reply with Quote
If you ever implement this feature, you could also search #define's with the provided number value.
Unfortunately they are used almost as frequently as enums.

And if the define is like this:
#define SOME_MESSAGE_NUMBER (BASE_MESSAGE_NUMBER + 117)
it could be hard to find if it's logged as 2117.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Feb 06 2015 :  9:58:39 PM  Show Profile  Reply with Quote
This is an interesting idea, and it does make sense. I have put a note onto the case about this, but I am a little wary, since macros can get nasty. So if done, and sadly there are no guarantees, there might be edge cases that are not handled so neatly.

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