Beispiel #1
0
        private void BuildFolder()
        {
            if (StackedFolderStartingOffsets.Count == 0)
            {
                return;
            }

            FoldingStarting startOffset = StackedFolderStartingOffsets.Pop();

            if (startOffset.Offset < last_step_tablerow_offset)
            {
                NewFolding folding = new NewFolding(startOffset.Offset, last_step_tablerow_offset);
                if (startOffset.Type == FoldingType.Scenario)
                {
                    folding.DefaultClosed = IsCloseScenarioFolding;
                    folding.IsDefinition  = true;
                }
                else
                {
                    folding.DefaultClosed = IsCloseTablesFolding;
                }

                DocumentLine start_line = Document.GetLineByOffset(startOffset.Offset);
                folding.Name = GherkinFormatUtil.GetText(Document, start_line);
                newFoldings.Add(folding);
            }
        }
Beispiel #2
0
        private void StartScenarioFolding(DocumentLine line)
        {
            FoldingStarting start = new FoldingStarting()
            {
                Type = FoldingType.Scenario, Offset = line.Offset
            };

            StackedFolderStartingOffsets.Push(start);
        }
Beispiel #3
0
 private void StartTableFolding(DocumentLine line)
 {
     if (!processing_table_row)
     {
         FoldingStarting start = new FoldingStarting()
         {
             Type = FoldingType.Table, Offset = line.Offset
         };
         StackedFolderStartingOffsets.Push(start);
         processing_table_row = true;
     }
 }