Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Find Symbol Result Window got double results when I search object use IVsSimpleLibrary2

$
0
0

I implement IVsSimpleLibrary2 and IVsSimpleObjectList2 for "find all reference".. and I could query result from list.. While, whenever code run into method doSearch()..GetList2 of IVsSimpleLibrary seems to be called twice and return double information of results..How did it happened?

Code's below:

 IVsObjectSearch search = GetService(typeof (SVsObjectSearch)) as IVsObjectSearch;
 IVsFindSymbol find = search as IVsFindSymbol;
  criteria = new VSOBSEARCHCRITERIA2[1];
 criteria[0].eSrchType = VSOBSEARCHTYPE.SO_ENTIREWORD;
 criteria[0].grfOptions = (uint)(_VSOBSEARCHOPTIONS.VSOBSO_CASESENSITIVE | _VSOBSEARCHOPTIONS.VSOBSO_LOOKINREFS);
   criteria[0].szName = strText;
  Guid g = new Guid("0925166e-a743-49e2-9224-bbe206545104");
  ObjectLib = new SearchLibrary(g, strText);
  uint SearchCookie;
  IVsObjectManager2 objManager = GetService(typeof(SVsObjectManager)) as IVsObjectManager2;
   objManager.RegisterSimpleLibrary(ObjectLib, out SearchCookie);
int returnValue = find.DoSearch(ref g, criteria);



Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>