Я использую библиотеку C# AvalonEdit из кода F# и выполняю завершение кода. Вроде все работает как положено, показывается окно завершения кода, всплывающие подсказки на отдельных его строках всплывают корректно, выделенные слова вставляются в документ. Единственная проблема заключается в том, что все строки в окне завершения пусты, как будто в них ничего нет.
Пошаговое выполнение кода в Visual Studion 2013 здесь не совсем подходит, поскольку оно оказывает неожиданное влияние на поведение окна завершения, которое отличается от того, когда точки останова не используются.
Вот MyCompletionData, взятый из справки AvalonEdit и переписанный на F#:
module CompletionData
open ICSharpCode.AvalonEdit.CodeCompletion
open System
open System.Windows.Media.Imaging
/// Implements AvalonEdit ICompletionData interface to provide the entries in the
/// completion drop down.
type MyCompletionData (text:string) =
let _text = text
interface ICompletionData with
member this.Complete (textArea, completionSegment, insertionRequestEventArgs) =
textArea.Document.Replace(completionSegment, ((this :> ICSharpCode.AvalonEdit.CodeCompletion.ICompletionData).Text: string));
// Use this property if you want to show a fancy UIElement in the list.
member this.Content
with get () = (this :> ICSharpCode.AvalonEdit.CodeCompletion.ICompletionData).Text :> obj
member this.Description
with get () = ("Description for " + (this :> ICSharpCode.AvalonEdit.CodeCompletion.ICompletionData).Text ) :> obj
member this.Image
with get () = null
member this.Priority
with get () = 1.0
member this.Text = _text