예제 #1
0
        public void Examples(string keyword, string name, string description, GherkinBufferSpan headerSpan, GherkinBufferSpan descriptionSpan)
        {
            var editorLine = headerSpan.StartPosition.Line;

            OnCloseLevel2Outlinings(CalculateRegionEndLine(editorLine));

            RegisterKeyword(keyword, headerSpan);
            ColorizeSpan(descriptionSpan, classifications.Description);

            ScenarouOutlineExampleSet exampleSet = new ScenarouOutlineExampleSet(keyword, name,
                                                                                 editorLine - CurrentFileBlockBuilder.KeywordLine);

            CurrentFileBlockBuilder.ExampleSets.Add(exampleSet);

            CloseLevel2Outlinings += regionEndLine =>
            {
                if (regionEndLine > editorLine)
                {
                    AddOutline(
                        editorLine,
                        regionEndLine,
                        exampleSet.FullTitle());
                }
            };
        }
        public void Examples(string keyword, string name, string description, GherkinBufferSpan headerSpan, GherkinBufferSpan descriptionSpan)
        {
            var editorLine = headerSpan.StartPosition.Line;
            OnCloseLevel2Outlinings(CalculateRegionEndLine(editorLine));

            RegisterKeyword(keyword, headerSpan);
            ColorizeSpan(descriptionSpan, classifications.Description);

            ScenarouOutlineExampleSet exampleSet = new ScenarouOutlineExampleSet(keyword, name, 
                editorLine - CurrentFileBlockBuilder.KeywordLine);
            CurrentFileBlockBuilder.ExampleSets.Add(exampleSet);

            CloseLevel2Outlinings += regionEndLine =>
                                         {
                                             if (regionEndLine > editorLine)
                                                 AddOutline(
                                                     editorLine,
                                                     regionEndLine,
                                                     exampleSet.FullTitle());
                                         };
        }