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
 Find Symbol no longer favors start-of-line matches
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

calon
New Member

USA
5 Posts

Posted - Apr 07 2015 :  12:33:31 PM  Show Profile  Reply with Quote
I'm unsure when exactly this behavior changed for me -- it might have been when my company upgraded us to VS2013.

The codebase I'm working in has a whole ton of generated functions providing metadata on various classes. When I open the Find Symbol dialog to search for "CObject" (in this contrived example), I get results like this with the top line auto-selected:

[ClassMetadataFn<CObjectA>]
ClassMetadataFn<CObjectB>
ClassMetadataFn<CObjectC>
ClassMetadataFn<CObjectD>
CObjectA
CObjectB
CObjectC
CObjectD


I swear that this sort of search used to do the "right thing" and auto-select CObjectA (since it's a perfect partial match at the start of the symbol). For a while now I've been having to manually navigate past the generated functions to get to the interesting results.

Did something change here? Or is my memory just failing me? = \
(Note: selecting "Only classes, structs & namespaces" isn't a good answer since this same problem applies to generated functions for enum metadata.)

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Apr 07 2015 :  1:23:18 PM  Show Profile  Reply with Quote
Are the Meta items actually template instances? I may be missing something obvious here, but using the simple test code:

class CObjectA { };
class CObjectB { };
class CObjectC { };
class CObjectD { };

template <class T>
class ClassMetadataFn
{
	T memberOne;
};

ClassMetadataFn<CObjectA> testTemplateA;
ClassMetadataFn<CObjectB> testTemplateB;
ClassMetadataFn<CObjectC> testTemplateC;
ClassMetadataFn<CObjectD> testTemplateD;


when I then look in the Find Symbol dialog, and filter on "cobjecta" only 1 item is listed, the class its self. If I filter with "testTemplateA" then I see the template type in the definition field, but the dialog is not filtering on the definition field.

Off hand I am not sure how you would get the dialog to filter on the template with its type included.

Can you try the filter ".cobject" and see if this helps? Placing the dot at the start means start of word, or an actual dot, so this may help.

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

calon
New Member

USA
5 Posts

Posted - Apr 07 2015 :  1:38:13 PM  Show Profile  Reply with Quote
Hopefully this full example I just tested will clarify:


class CObjectA { };
class CObjectB { };
class CObjectC { };
class CObjectD { };

template<class T> char ClassMetadataFn();
template<> ClassMetadataFn<CObjectA>() { return 'A'; }
template<> ClassMetadataFn<CObjectB>() { return 'B'; }
template<> ClassMetadataFn<CObjectC>() { return 'C'; }
template<> ClassMetadataFn<CObjectD>() { return 'D'; }


Typing "CObject" or ".CObject" into the Find Symbol dialog highlights "ClassMetadataFn<CObjectA>". I could live with a "start of line" character akin to '.', though it still feels awkward that it doesn't prefer that by default for the initial auto-selection.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Apr 08 2015 :  3:28:39 PM  Show Profile  Reply with Quote
I had not thought to try a template function. I am seeing the same effect now, thank you. Your memory is right, this has changed. I have put in a bug report for the change:

case=88985

I have found a couple of work arounds in the mean time. If you use the filter "cobject -meta" this will filter out all of the meta items, leaving you with just the items you want.

Alternatively, if you turn off the registry key setting:

http://docs.wholetomato.com/default.asp?W553

and now use the dot at the start, so the filter ".cobject" this also filters out the meta items.

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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jun 11 2015 :  2:44:30 PM  Show Profile  Reply with Quote
case=88985 is fixed in build 2068
Go to Top of Page

calon
New Member

USA
5 Posts

Posted - Jun 12 2015 :  3:09:59 PM  Show Profile  Reply with Quote
Works like a charm. Thanks so much!!!
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