In the SDI Editor sample I can run it, paste the following code in it and enter "eventName." to get completion list for .NET C# string methods.
public class TestProcessor : IProcessor
{
public CICHelper Helper { get; set; }
public void Initialize(string eventName, string eventValue, string stepName, string applicationName, string projectName, string projectDir)
{
}
}
I've done all the setup the sample does in my code but I can't get this to show up in my editor.
I also search the Samples solution and nowhere does the SDI Editor catch a "." being entered.
Any suggestions where to look?
I handle the change event like this:
private void Editor_OnDocumentTextChanged(object sender, EditorSnapshotChangedEventArgs e)
{
if (e.TextChange.Source == editor.ActiveView)
{
if (e.IsTypedWordStart)
{
// If no completion session is currently open, show a completion list
if (!editor.IntelliPrompt.Sessions.Contains(IntelliPromptSessionTypes.Completion))
{
// Open the completion list session here
EditorCommands.RequestIntelliPromptCompletionSession.Action.Execute(editor.ActiveView);
}
}
else
{
// The e.TypedText is not null only when a Typing change occurs with a single operation that inserts text,
// so we can check that to display the completion list when "<" is typed
switch (e.TypedText)
{
case ".":
{
// A dot was typed so open the completion list session here
// If no completion session is currently open, show a completion list
if (!editor.IntelliPrompt.Sessions.Contains(IntelliPromptSessionTypes.Completion))
{
// Open the completion list session here
EditorCommands.RequestIntelliPromptCompletionSession.Action.Execute(editor.ActiveView);
}
break;
}
}
}
}
}
The IsTypedWordStart section works and I do hit breakpoints in switch statement for "."