Q:

Get current source file methods in Visual Studio Text Editor Extension

I try to write extension for Visual Studio, but I can't find documentation about my question. In SDK examples only for some things like text hightliting, but no any example which demostrate how directly work with Intelliscense. Documentations from MSDN - also not good.
It is possible - get list of all methods from current opened source file, if I have IWpfTextView?

A:

It is possible - get list of all methods from current opened source file, if I have IWpfTextView?

You can get list of all methods via CodeElement and check if it a CodeFunction object. The following code for your reference.
You can get current opened source file via DTE.ActiveDocument
DTE2 dte = this.ServiceProvider.GetService(typeof(DTE)) as DTE2;
            FileCodeModel fcm = dte.ActiveDocument.ProjectItem.FileCodeModel as FileCodeModel;
            foreach (CodeElement element in fcm.CodeElements)
            {
                if (element is CodeNamespace)
                {
                    CodeNamespace nsp = element as CodeNamespace;

                    foreach (CodeElement subElement in nsp.Children)
                    {
                        if (subElement is CodeClass)
                        {
                            CodeClass c2 = subElement as CodeClass;
                            foreach (CodeElement item in c2.Children)
                            {
                                if (item is CodeFunction)
                                {
                                    CodeFunction cf = item as CodeFunction;
                                    MessageBox.Show(cf.Name);
                                }
                            }
                        }
                    }
                }
            }

