示例#1
0
 public void AddSnippets(ref FoxProDeclarations declarations)
 {
     if (null == this.ExpansionsList)
     {
         return;
     }
     foreach (VsExpansion expansionInfo in this.ExpansionsList)
     {
         declarations.AddDeclaration(new Declaration(expansionInfo));
     }
 }
示例#2
0
        public override Declarations GetDeclarations(IVsTextView view, int line, int col, TokenInfo info, ParseReason reason)
        {
            System.Diagnostics.Debug.Print("GetDeclarations line({0}), col({1}), TokenInfo(type {2} at {3}-{4} triggers {5}), reason({6})",
                                           line, col, info.Type, info.StartIndex, info.EndIndex, info.Trigger, reason);

            IList <Declaration> declarations       = module.GetAttributesAt(line + 1, info.StartIndex);
            FoxProDeclarations  FoxProDeclarations = new FoxProDeclarations(declarations, language);

            //Show snippets according to current language context
            if (IsContextRightForSnippets(line, info))
            {
                ((FoxProLanguage)language).AddSnippets(ref FoxProDeclarations);
            }

            //Sort statement completion items in alphabetical order
            FoxProDeclarations.Sort();
            return(FoxProDeclarations);
        }