Example #1
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;
 }
Example #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);
        }
Example #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);
        }
Example #4
0
        void CreateElementFoldingRegionIfNotSingleLine()
        {
            XmlElementFold fold = elementFoldStack.Pop();

            fold.ReadEnd(reader);
            if (!fold.IsSingleLine)
            {
                FoldingRegion foldingRegion = CreateFoldingRegion(fold);
                folds.Add(foldingRegion);
            }
        }
Example #5
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;
		}