Hi,
I am integrating VisualStudio and trapped the mouse cursor on the code file to get selection type (function )using
TextSelection
sel = (TextSelection)dte.ActiveDocument.Selection;
TextPoint
pnt = (TextPoint)sel.ActivePoint;
FileCodeModel fcm = dte.ActiveDocument.ProjectItem.FileCodeModel;
codeElement = fcm.CodeElementFromPoint(pnt, elemType);
codeFunction = codeElement
as CodeFunction;
and able to the selected function prototype/signature using the following.
vsCMElement elemType = vsCMElement.vsCMElementFunction;
string
methodSignature = codeFunction.get_Prototype((int)EnvDTE.vsCMPrototype.vsCMPrototypeFullname | (int)EnvDTE.vsCMPrototype.vsCMPrototypeType | (int)EnvDTE.vsCMPrototype.vsCMPrototypeParamNames | (int)EnvDTE.vsCMPrototype.vsCMPrototypeParamTypes);
I want to get the body of the function but I am not able to find any switch in EnvDTE.vsCMPrototype which returns the body of the function .
Can any body help
Thanks,
AKB