I'm trying to write the Symbol Library portion of my language service integration package so we can use the Object Browser, Caller/Callee Browser, and related functionality of the VS IDE and I'm running into a bunch of issues, mostly related to the very sparse low-level documentation related to implementing the classes and library necessary for these features to operate. I think I understand the high-level concepts (since they're pretty self-explanatory and quite obvious!) as outlined in the Supporting Symbol-Browsing Tools article, but it's the actual implementation of the required "list category" functions that seem to be throwing me for a loop. Specifically, the IVsSimpleLibrary2.GetSupportedCategoryFields2 and IVsSimpleObjectList2.GetCategoryField2 functions. My understanding is that the GetSupportedCateogryFields2 function is called in order for the IDE to determine what kinds ofpossible lists and data the library can provide, and GetCategoryField2 is called to determine the actual information provided by an element in a list. Based on the parameters specified for the tool in question, the IVsSimpleLibrary2.GetList2 and IVsSimpleObjectList2.GetList2 functions are called to request that I return a list containing the specified data. The IDE will then use GetCategoryFields2 to pull out the required information from this list, and the process continues. So far, so good. This makes sense!
However, actually trying to implement this has left me completely lost. The enumerated values for different category types have no documentation explaining what they actuallymean, and I can't figure how to provide the correct category fields in order for the IDE to show me the data I'm interested in.
Here's a screenshot of what the IDE shows for a very simple set of C functions. My script files are included in this same project, and I want a similar set of lists and items to be shown for the types and functions defined in the scripts.
What would be extremely helpful is if someone who has implemented a symbol library in the past could maybe detail for me the categories that the library would specify and the category fields that each list would specify in order to generate the output shown in the image. The scripting language I'm writing these tools for has functions, enums, structures, and many other types very similar to C, so it should be relatively straight forward to implement everything once I understand the relationships between the category fields specified and the items actually shown by the UI!
I have taken a look at the IronPython sample, but it doesn't seem to be doing what it should; for example, its GetSupportedCategoryFields2 function simply returns
pgrfCatField = (uint)_LIB_CATEGORY2.LC_HIERARCHYTYPE | (uint)_LIB_CATEGORY2.LC_PHYSICALCONTAINERTYPE;
without checking to see what category was requested or anything! Suffice it to say, it's not very helpful.
Thanks for any insight anyone is able to provide!