/// <summary> /// Fills the autoCompletionList with strings formated for AutoCompletion. /// </summary> /// <param name="autoCompletionList">Target string list</param> /// <param name="methodList">Source MacroMethod list</param> private static void FillFromMethodList(List <string> autoCompletionList, List <MacroMethod> methodList) { foreach (MacroMethod method in methodList) { string m = method.Name.Trim().ToLower(); if (!MacroElement.IsValidOperator(m) && !MacroElement.IsWordOperator(m)) { if ((m != "logtodebug") || CMSContext.CurrentUser.IsGlobalAdministrator) { // At sign at the end is to distinguish between method and property in the script afterwards if (string.IsNullOrEmpty(method.Snippet)) { autoCompletionList.Add(method.Name + "\n"); } else { autoCompletionList.Add(method.Name + "\n" + method.Snippet); } } } } }