Hi guys,
For a build system application we created a logviewer and we are using it to display our build logs and so far everything work perfectly.
Now I'm trying to implement a feature that fold part of the log depending the section a user wants to look into.
I can easily addFold to the editor session :
for (var i = 0; i < value.Sections.Section.length; i++) {
var rangeFold = new range(parseInt(value.Sections.Section[i].LineNumber), 0, parseInt(value.Sections.Section[i].LineNumber) + parseInt(value.Sections.Section[i].Length), Infinity);
ace.edit("editor").getSession().addFold(value.Name, rangeFold);
}
And the code is folded but when I unfold, the log I can't fold it back and it seem the folddata disapear from the session.
In the end all the custom folding I'm adding , I would like it to be persistent much like when fold/unfolding comment in any programming language. (having the +/- on the margin , to fold/unfold)
I'm getting a bit frustrasted trying to figure this out so how I would do that ?
Any help would be appreciated.
thank you very much.