int CompareFoldingRegion(FoldingRegion lhs, FoldingRegion rhs)
 {
     int compareBeginLine = lhs.Region.BeginLine.CompareTo(rhs.Region.BeginLine);
     if (compareBeginLine == 0) {
         return lhs.Region.BeginColumn.CompareTo(rhs.Region.BeginColumn);
     }
     return compareBeginLine;
 }
Beispiel #2
0
        int CompareFoldingRegion(FoldingRegion lhs, FoldingRegion rhs)
        {
            int compareBeginLine = lhs.Region.BeginLine.CompareTo(rhs.Region.BeginLine);

            if (compareBeginLine == 0)
            {
                return(lhs.Region.BeginColumn.CompareTo(rhs.Region.BeginColumn));
            }
            return(compareBeginLine);
        }
Beispiel #3
0
        NewFolding ConvertToNewFold(FoldingRegion foldingRegion)
        {
            NewFolding newFold = new NewFolding();

            newFold.Name        = foldingRegion.Name;
            newFold.StartOffset = GetStartOffset(foldingRegion.Region);
            newFold.EndOffset   = GetEndOffset(foldingRegion.Region);

            return(newFold);
        }
Beispiel #4
0
        void CreateElementFoldingRegionIfNotSingleLine()
        {
            XmlElementFold fold = elementFoldStack.Pop();

            fold.ReadEnd(reader);
            if (!fold.IsSingleLine)
            {
                FoldingRegion foldingRegion = CreateFoldingRegion(fold);
                folds.Add(foldingRegion);
            }
        }
		NewFolding ConvertToNewFold(FoldingRegion foldingRegion)
		{
			NewFolding newFold = new NewFolding();
			
			newFold.Name = foldingRegion.Name;
			newFold.StartOffset = GetStartOffset(foldingRegion.Region);
			newFold.EndOffset = GetEndOffset(foldingRegion.Region);
			
			return newFold;
		}