This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
It seems to me that CustomFoldManager requires the old Syntax to lex the input text, lexer does not seem to be enough. I think it should be improved to use lexer whenever available.
Yes, we should rewrite it. I think I rewrote it once, but it ended up in the dead codeline on some branch in CVS (editor_api or syntax something ??). I'll try to dig it out and re-apply to the main.
http://hg.netbeans.org/main/rev/c3c8d46c3eb3