locked
Develop custom "Find All Reference" Add-In RRS feed

  • Question

  • Hi all,

    I have been trying to develop a visual studio addin similar to Find All Reference. I could implement the Find All reference feature. code shown below:

    		IVsObjectList objectList;
                    VSOBSEARCHCRITERIA[] criteriaArray = new VSOBSEARCHCRITERIA[1];
                    VSOBSEARCHCRITERIA criteria = new VSOBSEARCHCRITERIA();
                    criteria.eSrchType = VSOBSEARCHTYPE.SO_ENTIREWORD;
                    criteria.grfOptions = (int) _VSOBSEARCHOPTIONS.VSOBSO_NONE;
                    criteria.szName = _selectedText;
                    criteriaArray[0] = criteria;
                    ServiceProvider sp = new ServiceProvider((IOleServiceProvider) _applicationObject);
                    IVsObjectSearch objsearch = sp.GetService(typeof (SVsObjectSearch)) as IVsObjectSearch;
                    objsearch.Find((int) __VSOBSEARCHFLAGS.VSOSF_SHOWUI, criteriaArray, out objectList);

    Now, i need to show the Callers/code which reference the results in objectList. i,e, i am trying to develop a tool for impact analysis. The need to display the complete dependency path.

    For this i tried retrieving the result items displayed in UI, from teh objectList.

    If anybody can provide any help on this would be highly appreciated.

    Thanks,

    Bijith


    • Edited by Bijithnv Tuesday, October 16, 2012 9:59 AM
    Tuesday, October 16, 2012 9:41 AM