I would like to be able to put selected index of the IntelliPrompt list on the "declaring type" after typing "myString = new<spacebar>", so the IntelliPrompts automatically highlights by default the "declaring type".
I 'm trying to do this by using SyntaxEditorIntelliPromptMemberListPreFilter. Here I can perfectly detect the New declaration and the "declaring type". But I don't have any clue how to handle this further. Could you please give some hints? Perhaps I should handle this completely different?Erik Pepping
I 'm trying to do this by using SyntaxEditorIntelliPromptMemberListPreFilter. Here I can perfectly detect the New declaration and the "declaring type". But I don't have any clue how to handle this further. Could you please give some hints? Perhaps I should handle this completely different?
void csharpLanguage_SyntaxEditorIntelliPromptMemberListPreFilter(object sender, ActiproSoftware.SyntaxEditor.Addons.DotNet.Dom.IntelliPromptMemberListPreFilterEventArgs e)
{
try
{
if (e.Context.Type == ActiproSoftware.SyntaxEditor.Addons.DotNet.Context.DotNetContextType.NewObjectDeclaration)
{
for (int i = editor.Document.Tokens.IndexOf(e.Context.TargetOffset)-1; i > 0; i--)
{
if (editor.Document.Tokens[i].Key == "Identifier")
{
//The declaring type
}
}
}
}
catch (Exception)
{
}
}