There are some strange things (probably a bug) with folding in JSDT when I collapse all folds (as in key command "Collapse All" in Window > Preferences > General > Keys). If I then expand only one fold, it unfolds and leaves many folding marks inside expanded area in places where they shouldn't be, as on this screenshot:
https://i.stack.imgur.com/fScKL.png
Even worse, sometimes when I collapse all folds and then toggle them by clicking on (+) signs, the folds get nuts and collapse and expand totally wrong lines where shouldn't be any folds at all.
If I put the cursor on one of those extra folding marks and type anything, all the extra folding marks disappear.
This behavior doesn't seem to change since JSDT 1.2 (I use 1.4.0.v20111109). Is this a known bug, are there any fixes or workarounds?