Hi,
thanks for your reply, I am still confused.
The Language I said in above is defined by our team, so the .Net Add-on is not suitable for our purpose,we wrote the parse for it . now we can get the AST and get the variable infomation while the Keypressing event occurs, in this event,we add the valid variables info and basic types info to the editor.IntelliPromptMemberlist,such as :
//beginning of code
private void editor_KeyTyping(object sender, ActiproSoftware.SyntaxEditor.KeyTypingEventArgs e)
{
editor.IntelliPrompt.MemberList.Add(new IntelliPromptMemberListItem("1111", 1, "11"));
editor.IntelliPrompt.MemberList.Add(new IntelliPromptMemberListItem("2222", 1, "22"));
editor.IntelliPrompt.MemberList.Add(new IntelliPromptMemberListItem("3333", 1, "33"));
editor.IntelliPrompt.MemberList.Add(new IntelliPromptMemberListItem("4444", 1, "44"));
editor.IntelliPrompt.MemberList.Show();
return;
//end of code
the info displays well ,and the partial selection works well too,but when pressing the spacebar,always get the get the information: IntelliPromptMemberListClosing: (Cancelled).
to solve this problem,I add the code in the event of editor_TriggerActivated,and set space as trigger too in Csharp.xml
//beginning of code
private void editor_TriggerActivated(object sender, ActiproSoftware.SyntaxEditor.TriggerEventArgs e) {
editor.IntelliPrompt.MemberList.Clear();
editor.IntelliPrompt.MemberList.Add(new IntelliPromptMemberListItem("aaa", 1, "11"));
editor.IntelliPrompt.MemberList.Add(new IntelliPromptMemberListItem("2222", 1, "22"));
editor.IntelliPrompt.MemberList.Add(new IntelliPromptMemberListItem("3333", 1, "33"));
editor.IntelliPrompt.MemberList.Add(new IntelliPromptMemberListItem("5555", 1, "44"));
editor.IntelliPrompt.MemberList.Show();
return;
//end of code
<!--<KeyPressTrigger Key="chardTrigger" Character=" ">
<KeyPressTriggerValidStates>
<KeyPressTriggerValidState State="DefaultState" />
</KeyPressTriggerValidStates>
</KeyPressTrigger>-->
while pressing the spacebar,it works well .
I 'd like to implement the auto-complete in the event of Keypressing ,how to solve this problem? thank you.