Hi, I'm struggling to make sense of the hierarchy of documents whilst writing my plugin. I'm writing a custom macro for a live template that will pull out the description from a classes Summary XML documentation (in bold):
/// Retrieves the summary text from a types documentation
I have the following code already to obtain a reference to the file that called the macro:
IPsiSourceFile psiSourceFile = context.SessionContext.Document.GetPsiSourceFile(context.SessionContext.Solution);
var psiLanguageType = MacroUtil.GetLanguageType(context);
var file = psiSourceFile.GetPsiFile(psiLanguageType);
I have the reference to the file - how to I pull out the first class declaration (or all the class declarations) from the document? The file object here gives me the ability to read the namespaces - but not anything further.
I'm using Resharper 6 - andmust admit I am finding it heavy going without XML documentation of many of the objects and no document modal documentation that I could find. :(
Any help is appreciated.