Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Search enum elements by their const values

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
Alek86 Posted - Oct 03 2013 : 10:35:08 AM
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.
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Feb 06 2015 : 9:58:39 PM
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.
Alek86 Posted - Feb 06 2015 : 1:58:23 PM
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.
feline Posted - Oct 03 2013 : 1:18:43 PM
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

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