Posted 17 years ago
by Kelly Leahy
-
Software Architect,
Milliman
I've implemented my own AST and I added outlining by doing the following:
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!
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;
I can't seem to find a path to get to these!
Kelly Leahy Software Architect Milliman, USA