public TextFormattingSource(
			TextBuffer textBuffer
			, IClassificationFormatMap classificationFormatMap
			, Int32 startIndex
			, Int32 length
			, IList<ClassificationSpan> classificationSpans
			, IList<SpaceNegotiation> spaceNegotiations
			)
		{
			List<SpaceNegotiation> list = null;
			if (spaceNegotiations != null)
			{
				list = new List<SpaceNegotiation>(spaceNegotiations);
				list.Sort(new Comparison<SpaceNegotiation>(this.Comparison));
			}
			String text = textBuffer.GetText(startIndex, length);
			_normalizedSpanManager = new NormalizedSpanManager(text, startIndex, classificationSpans, list, classificationFormatMap);
		}
Пример #2
0
        public TextFormattingSource(
            TextBuffer textBuffer
            , IClassificationFormatMap classificationFormatMap
            , Int32 startIndex
            , Int32 length
            , IList <ClassificationSpan> classificationSpans
            , IList <SpaceNegotiation> spaceNegotiations
            )
        {
            List <SpaceNegotiation> list = null;

            if (spaceNegotiations != null)
            {
                list = new List <SpaceNegotiation>(spaceNegotiations);
                list.Sort(new Comparison <SpaceNegotiation>(this.Comparison));
            }
            String text = textBuffer.GetText(startIndex, length);

            _normalizedSpanManager = new NormalizedSpanManager(text, startIndex, classificationSpans, list, classificationFormatMap);
        }