protected virtual void CharAdded(object sender, CharAddedEventArgs e) { if (e.Ch == '(') { this._sca.CallTip.Show("TODO: parameters", _sca.CurrentPos); } else { this._sca.CallTip.Cancel(); try { string entry = GetSentenceAt(_sca.CurrentPos); this._sca.CallTip.Show(entry, _sca.CurrentPos); var autocomplete = EvaluationHelper.GetCompletions(entry, _sca.Text); if (autocomplete.Count > 0) { if (entry.Length == 1 || entry.Length > 2 && entry[entry.Length - 2] == '.') { _sca.AutoComplete.Show(_sca.GetWordFromPosition(_sca.CurrentPos).Length, autocomplete); } _sca.AutoComplete.List = autocomplete; } } catch (Exception ex) { this._sca.CallTip.Show(ex.Message, _sca.CurrentPos); } } }