public ScriptTokenReference GetTokenReferenceForCurrentState()
{
int nextPos = scintillaControl1.SelectionStart;
int lineIndex = scintillaControl1.LineFromPosition(nextPos);
string line = scintillaControl1.GetLine(lineIndex);
return new ScriptTokenReference
{
CharacterIndex = nextPos,
CurrentLine = line,
LineIndex = lineIndex,
Token = this.SelectedText,
Script = _autoCompleteForThis
};
}