private bool TryGetParserInput(out ScripterParserInput input)
        {
            input = null;

            IResultGrid grid = _hostCtx.GetFocusedResultGrid();

            if (grid != null)
            {
                input = new ScripterParserInput(grid.GetSelectedValue(), 0);
            }

            if (input == null)
            {
                IEditor editor = _hostCtx.GetCurrentEditor();
                if (editor != null)
                {
                    EditedLine line = editor.GetEditedLine();
                    input = new ScripterParserInput(line.Line, line.CaretPos);
                }
            }

            return(input != null);
        }