public override void Attach(ITextEditor editor) { if (editor == null) { return; } var textEditor = editor.GetService(typeof(TextEditor)) as TextEditor; if (textEditor != null) { pinLayer = new PinLayer(textEditor.TextArea); textEditor.TextArea.TextView.InsertLayer( pinLayer, KnownLayer.Caret, LayerInsertionPosition.Above); } _editor = editor; CreatePins(_editor); base.Attach(editor); }
public override void Detach() { ClosePins(_editor); pinLayer = null; base.Detach(); }