public void IntellicodeDisplayMemberlist(IntellicodeEntryCollection entries) { __IntellicodeDisplayMemberlist(entries); }
private void GetObjectMemberList(string obj, int start_offset) { // Grab the memberlist for the said object if (!g.Project.TokenObjList.ContainsKey(obj.ToLower())) return; IntellicodeEntryCollection iec = new IntellicodeEntryCollection(); CProject.TokenObject tokobj = (CProject.TokenObject)g.Project.TokenObjList[obj.ToLower()]; foreach(CProject.TokenObject.ObjectDescr funcs in tokobj.ObjectFunctions.Values) { string fparams = ""; if (funcs.FuncParams == null || funcs.FuncParams.Length == 0) fparams = "void"; else fparams = String.Join(", ", funcs.FuncParams); iec.Add(new IntellicodeEntry(funcs.FuncName, "<b>" + funcs.FuncName + "</b> (<i>" + fparams + "</i>)" + ((funcs.FuncDescr == "") ? "" : "<br />" + funcs.FuncDescr), Convert.ToInt32(ActiproSoftware.Products.SyntaxEditor.IconResource.InternalMethod), funcs.FuncName, "")); /*txtEditor.IntelliPrompt.MemberList.Add(new IntelliPromptMemberListItem(funcs.FuncName, Convert.ToInt32(ActiproSoftware.Products.SyntaxEditor.IconResource.InternalMethod), "<b>" + funcs.FuncName + "</b> (<i>" + fparams + "</i>)" + ((funcs.FuncDescr == "") ? "" : "<br/>" + funcs.FuncDescr), funcs.FuncName, ""));*/ } // Search the other classes if (tokobj.ObjectType != null) { CAutoComplete.ClassEntry cls = ac.ReturnClassObject(tokobj.ObjectType.ToLower()); if (cls != null) { foreach(CAutoComplete.ClassEntry.FuncEntry func in cls.func_list.Values) { iec.Add(new IntellicodeEntry(func.func_name, "<u>" + func.func_ret + "</u> <b>" + func.func_name + "</b> (<i>" + func.func_params.Replace("<", "<") + "</i>)" + ((func.func_descr == "") ? "" : "<br />" + func.func_descr), Convert.ToInt32(ActiproSoftware.Products.SyntaxEditor.IconResource.PublicMethod), func.func_name, "")); /*txtEditor.IntelliPrompt.MemberList.Add(new IntelliPromptMemberListItem(func.func_name, Convert.ToInt32(ActiproSoftware.Products.SyntaxEditor.IconResource.PublicMethod), "<u>" + func.func_ret + "</u> <b>" + func.func_name + "</b> (<i>" + func.func_params.Replace("<", "<") + "</i>)" + ((func.func_descr == "") ? "" : "<br/>" + func.func_descr), func.func_name, ""));*/ } foreach(CAutoComplete.ClassEntry.PropEntry prop in cls.prop_list.Values) { iec.Add(new IntellicodeEntry(prop.prop_name, " " + prop.prop_type + " <b>" + prop.prop_name + "</b>", Convert.ToInt32(ActiproSoftware.Products.SyntaxEditor.IconResource.PublicProperty), prop.prop_name, "")); } } } // Run it through to the plugins /*foreach(IPlugin plugin in frmMain.stc_Plugins) plugin.onBeforeDisplayIntellicode(iec, IntellicodeType.DeclaredObjectCompletion, "", obj);*/ // Add it to the intelliprompt list foreach(IntellicodeEntry entry in iec) txtEditor.IntelliPrompt.MemberList.Add(new IntelliPromptMemberListItem(entry.EntryName, entry.EntryIconIndex, entry.EntryDescription, entry.EntryInsertBefore, entry.EntryInsertAfter)); txtEditor.IntelliPrompt.MemberList.Show(); }
private void GetVariableMemberList(string var, int start_offset) { // Grab the memberlist for the said variable CAutoComplete.ClassEntry cls = GetObjDeclare(start_offset, var); if (cls == null) return; IntellicodeEntryCollection iec = new IntellicodeEntryCollection(); foreach(CAutoComplete.ClassEntry.FuncEntry func in cls.func_list.Values) { iec.Add(new IntellicodeEntry(func.func_name, "<u>" + func.func_ret + "</u> <b>" + func.func_name + "</b> (<i>" + func.func_params.Replace("<", "<") + "</i>)" + ((func.func_descr == "") ? "" : "<br />" + func.func_descr), Convert.ToInt32(ActiproSoftware.Products.SyntaxEditor.IconResource.PublicMethod), func.func_name, "")); /*txtEditor.IntelliPrompt.MemberList.Add(new IntelliPromptMemberListItem(func.func_name, Convert.ToInt32(ActiproSoftware.Products.SyntaxEditor.IconResource.PublicMethod), "<u>" + func.func_ret + "</u> " + "<b>" + func.func_name + "</b> (<i>" + func.func_params.Replace("<", "<") + "</i>)" + ((func.func_descr == "") ? "" : "<br/>" + func.func_descr), func.func_name, ""));*/ } foreach(CAutoComplete.ClassEntry.PropEntry prop in cls.prop_list.Values) { iec.Add(new IntellicodeEntry(prop.prop_name, prop.prop_type + " " + prop.prop_name, Convert.ToInt32(ActiproSoftware.Products.SyntaxEditor.IconResource.PublicProperty), prop.prop_name, "")); /*txtEditor.IntelliPrompt.MemberList.Add(new IntelliPromptMemberListItem(prop.prop_name, Convert.ToInt32(ActiproSoftware.Products.SyntaxEditor.IconResource.PublicProperty), prop.prop_type + " " + prop.prop_name, prop.prop_name, ""));*/ } // Run it through to the plugins /*foreach(IPlugin plugin in frmMain.stc_Plugins) plugin.onBeforeDisplayIntellicode(iec, IntellicodeType.DeclaredVariableCompletion, var, "");*/ // Add it to the intelliprompt list foreach(IntellicodeEntry entry in iec) txtEditor.IntelliPrompt.MemberList.Add(new IntelliPromptMemberListItem(entry.EntryName, entry.EntryIconIndex, entry.EntryDescription, entry.EntryInsertBefore, entry.EntryInsertAfter)); txtEditor.IntelliPrompt.MemberList.Show(); }
public static void IntellicodeDisplayMemberlist(IntellicodeEntryCollection entries) { // Is an editor window active? if (g.Main.GetActiveEditor() == null) return; UCEditor editor = g.Main.GetActiveEditor(); editor.txtEditor.IntelliPrompt.MemberList.Clear(); // Display it foreach (IntellicodeEntry ic in entries) { editor.txtEditor.IntelliPrompt.MemberList.Add(new ActiproSoftware.SyntaxEditor.IntelliPromptMemberListItem( ic.EntryName, ic.EntryIconIndex, "<b>" + ic.EntryName.Replace("<", "<") + " (</b>" + ic.EntryParams + "<b>)</b> " + ((ic.EntryDescription != "") ? "<br />" + ic.EntryDescription.Replace("<", "<") : "") , ic.EntryInsertBefore, ic.EntryInsertAfter) ); } }