public override void InsertCompletionText (CompletionListWindow window, ref KeyActions ka, KeyDescriptor descriptor)
{
if (XmlEditorOptions.AutoInsertFragments && dataType == DataType.XmlAttribute) {
//This temporary variable is needed because
//base.InsertCompletionText sets window.CompletionWidget to null
var completionWidget = window.CompletionWidget;
base.InsertCompletionText (window, ref ka, descriptor);
if (completionWidget is ITextEditorImpl) {
((ITextEditorImpl)completionWidget).EditorExtension.Editor.StartSession (new SkipCharSession ('"'));
}
//Even if we are on UI thread call Application.Invoke to postpone calling command
//otherwise code calling InsertCompletionText will close completion window created by this command
Application.Invoke ((s,e) => IdeApp.CommandService.DispatchCommand (TextEditorCommands.ShowCompletionWindow));
ka &= ~KeyActions.CloseWindow;
} else {
base.InsertCompletionText (window, ref ka, descriptor);
}
}