public CodeEditor() { SearchPanel.Install(TextArea); completionCancellation = new CancellationTokenSource(); TextArea.TextView.LineTransformers.Insert(0, new CodeHighlightingColorizer(() => workspaceService.GetDocument(documentFile))); TextArea.TextEntering += TextAreaTextEntering; TextArea.TextEntered += TextAreaTextEntered; errorMarkerService = new ErrorTextMarkerService(this); IsVisibleChanged += IsVisibleChangedHandler; }
public CodeEditor() { HighlightingManager.Instance.RegisterHighlighting("C#", new[] { ".cs" }, CreateCSharpHighlightingDefinition); TextArea.IndentationStrategy = new CSharpIndentationStrategy(Options); SearchPanel.Install(TextArea); recommendationCancellation = new CancellationTokenSource(); updateTextTask = Task.FromResult((object)null); TextArea.TextEntering += TextAreaTextEntering; TextArea.TextEntered += TextAreaTextEntered; errorMarkerService = new ErrorTextMarkerService(this); IsVisibleChanged += IsVisibleChangedHandler; }