Example #1
0
        public string GetExpression(int offset)
        {
            string fileName = View.ContentName;

            if (fileName == null)
            {
                fileName = View.UntitledName;
            }

            IExpressionFinder expressionFinder = ProjectDomService.GetExpressionFinder(fileName);
            string            expression       = expressionFinder == null?GetExpressionBeforeOffset(offset) : expressionFinder.FindFullExpression(Document.Text, offset).Expression;

            if (expression == null)
            {
                return(string.Empty);
            }
            else
            {
                return(expression.Trim());
            }
        }