Outlining: how to get from ParseData on OutliningNode?

SyntaxEditor for Windows Forms Forum

Posted 17 years ago by Kelly Leahy - Software Architect, Milliman
Avatar
I've implemented my own AST and I added outlining by doing the following:
            RootFormula rf = document.SemanticParseData as RootFormula;
            if (rf != null)
            {
                CollapsibleNodeOutliningParser cnop = new CollapsibleNodeOutliningParser();
                foreach (FormulaBody fb in rf.FindAllOfType<FormulaBody>())
                {
                    cnop.Add(new CollapsibleNodeOutliningParserData(fb.StartOffset, OutliningNodeAction.Start, fb));
                    cnop.Add(new CollapsibleNodeOutliningParserData(fb.EndOffset, OutliningNodeAction.End, fb));
                }
                return cnop.UpdateOutlining(document, new TextRange(0, document.Length));
            }
            return TextRange.Deleted;
Now, I need to be able to walk my OutliningNode tree and get back to the 'fb' ICollapsibleNode items that I passed to the outlining parser. Is there a way to do this?

I can't seem to find a path to get to these!

Kelly Leahy Software Architect Milliman, USA

Comments (1)

Posted 17 years ago by Kelly Leahy - Software Architect, Milliman
Avatar
Nevermind... I didn't remember that ICollapsibleNode inherits IOutliningNodeParseData. Seems I've asked this question before :(

Thanks,

Kelly Leahy Software Architect Milliman, USA

The latest build of this product (v24.1.1) was released 10 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.