Inheritance: Microsoft.VisualStudio.Package.AuthoringScope
Esempio n. 1
0
        public override AuthoringScope ParseSource(ParseRequest req)
        {
            XSharpAuthoringScope scope = new XSharpAuthoringScope();

            switch (req.Reason)
            {
            case Microsoft.VisualStudio.Package.ParseReason.None:
                break;

            case Microsoft.VisualStudio.Package.ParseReason.MemberSelect:
                break;

            case Microsoft.VisualStudio.Package.ParseReason.HighlightBraces:
                break;

            case Microsoft.VisualStudio.Package.ParseReason.MemberSelectAndHighlightBraces:
                break;

            case Microsoft.VisualStudio.Package.ParseReason.MatchBraces:
                break;

            case Microsoft.VisualStudio.Package.ParseReason.Check:
                break;

            case Microsoft.VisualStudio.Package.ParseReason.CompleteWord:
                break;

            case Microsoft.VisualStudio.Package.ParseReason.DisplayMemberList:
                break;

            case Microsoft.VisualStudio.Package.ParseReason.QuickInfo:
                break;

            case Microsoft.VisualStudio.Package.ParseReason.MethodTip:
                break;

            case Microsoft.VisualStudio.Package.ParseReason.Autos:
                break;

            case Microsoft.VisualStudio.Package.ParseReason.CodeSpan:
                break;

            case Microsoft.VisualStudio.Package.ParseReason.Goto:
                break;

            default:
                break;
            }
            return(scope);
        }
 public override AuthoringScope ParseSource(ParseRequest req)
 {
     XSharpAuthoringScope scope = new XSharpAuthoringScope();
     if (req.Reason == ParseReason.Check ||
         req.Reason == ParseReason.None)
     {
         // Parse the entire source as given in req.Text. Store results in the XSharpAuthoringScope object.
     }
     else if (req.Reason == ParseReason.DisplayMemberList)
     {
         // Parse the line specified in req.Line for the two tokens just before req.Col to get the identifier and the member connector symbol. 
         // Find members of the identifer in the parse tree and store the list of members in the Declarations class.
     }
     else if (req.Reason == ParseReason.MethodTip)
     {
         // Parse the line specified in req.Line for the token just before req.Col to obtain the name of the method. 
         // Find all method signatures with the same name in the existing parse tree and store the list of signatures in the Methods class.
     }
     // continue for the rest of the supported ParseReason values.
     return scope;
 }