コード例 #1
0
        public static CompletionItem[] GetCompletion(bool values, bool actions)
        {
            List <CompletionItem> completions = new List <CompletionItem>();

            foreach (ElementList element in Elements)
            {
                if ((element.IsValue && values) || (!element.IsValue && actions))
                {
                    completions.Add(new CompletionItem(element.Name)
                    {
                        detail        = element.GetObject().ToString(),
                        kind          = CompletionItem.Method,
                        documentation = Wiki.GetWikiMethod(element.WorkshopName)?.Description
                    });
                }
            }
            return(completions.ToArray());
        }