private void UpdateText(string text)
        {
            _elementGenerator.Refresh(text);

            _isInCustomUpdate = true;

            using (_textEditor.Document.RunUpdate())
            {
                _textEditor.Document.Text = text;
            }

            _isInCustomUpdate = false;
        }
 public void RefreshView()
 {
     _elementGenerator.Refresh(_textEditor.Text);
     _textEditor.TextArea.TextView.Redraw();
 }