Should it be possible to write a script which programmatically adds fold regions to a file (plain text or scheme'd)?
What I want to do is build an add-in that can take a text file and collapse it down to a bunch of lines that match a given regex. Once collapsed, I would then be able to open up selected regions to get more context about certain matches. I can do this in SlickEdit with Selective Display, and find this immensely helpful digging through large files (500K lines).
I've written a very small prototype that just uses Scintilla.HideLines/ShowLines to hide un-matched regions. However, I can't tell if it should possible to add fold points. I suspect I would do this with Scintilla.FoldLevel, but I suspect it is defined incorrectly. It is currently a property, but should probably be a set of methods:
GetFoldLevel(line)
SetFoldLevel(line, level)
Thanks
Jeremy