Esempio n. 1
0
        public ITextEditor CreateTextEditor(Microsoft.Expression.DesignModel.Text.ITextBuffer textBuffer)
        {
            EditableTextBuffer editableTextBuffer = textBuffer as EditableTextBuffer;

            if (editableTextBuffer != null)
            {
                return((ITextEditor)this.CreateCodeEditor(editableTextBuffer.TextBuffer));
            }
            return((ITextEditor)null);
        }
Esempio n. 2
0
            public ITextRange GetRangeForBuffer(Microsoft.Expression.DesignModel.Text.ITextBuffer textBuffer)
            {
                EditableTextBuffer editableTextBuffer = textBuffer as EditableTextBuffer;

                if (editableTextBuffer == null || editableTextBuffer.TextBuffer != this.span.TextBuffer)
                {
                    return(Microsoft.Expression.DesignModel.Code.TextRange.Null);
                }
                this.CacheSpan();
                Span span = this.span.GetSpan(editableTextBuffer.TextBuffer.CurrentSnapshot).Span;

                return((ITextRange) new Microsoft.Expression.DesignModel.Code.TextRange(span.Start, span.End));
            }