private void OnGivenWhenThenActivator(CodeCompletionProjectSteps steps)
 {
     var caretOffset = _editor.CaretOffset;
     var line = _editor.Document.GetLineByOffset(caretOffset);
     var type = _editor.Document.GetText(line.Offset, caretOffset - line.Offset - 1).Trim();
     if (type == Gherkin.And || type == Gherkin.But) type = GetContinuationType(line.PreviousLine);
     if (type == Gherkin.Given) ShowCompletionWindow(_steps.Givens);
     else if (type == Gherkin.When) ShowCompletionWindow(_steps.Whens);
     else if (type == Gherkin.Then) ShowCompletionWindow(_steps.Thens);
 }
        private void OnGivenWhenThenActivator(CodeCompletionProjectSteps steps)
        {
            var caretOffset = _editor.CaretOffset;
            var line        = _editor.Document.GetLineByOffset(caretOffset);
            var type        = _editor.Document.GetText(line.Offset, caretOffset - line.Offset - 1).Trim();

            if (type == Gherkin.And || type == Gherkin.But)
            {
                type = GetContinuationType(line.PreviousLine);
            }
            if (type == Gherkin.Given)
            {
                ShowCompletionWindow(_steps.Givens);
            }
            else if (type == Gherkin.When)
            {
                ShowCompletionWindow(_steps.Whens);
            }
            else if (type == Gherkin.Then)
            {
                ShowCompletionWindow(_steps.Thens);
            }
        }