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.
Created attachment 123878 [details] sample file Please check the screenshot, the first folding line does not match neither <head> or <html> tags. It's reproducible. Product Version: NetBeans IDE Dev (Build 201209040947) Java: 1.7.0_06; Java HotSpot(TM) Client VM 23.2-b09 System: Linux version 3.2.0-29-generic-pae running on i386; UTF-8; en_US (nb)
Created attachment 123879 [details] screenshot
Note that the blue line outlines the surrounding "brace" rather than code fold - although many times brace (e.g. curly brace in java, or tag in HTML) introduces a fold. The fold (black line) is probably wrong on the supplied picture; comments which begin on line 6 end on the same line; the comment ending at line 16 actually stars on line 15. So the fold should span line 15-16. The brace outline seems to cover correctly the area between head and its matching end tag (assuming caret was on the start or end head tag). If you agree with the above, pls. reassign to HTML for evaluation of the folding defect.
thanks, yes, the black line is what I meant. The code fold should also be for <head> tags (lines 7-29). Reassigning to HTML
Neither css nor html StructureScanner is the provider of the weird first fold. I've tried to debug and html provides correct folds, css provides no folds for the file. Svato, can you please find out who is the culprit and possibly reassign? Thanks.
OK
Apologies, Marek, the defective fold is provided by the Javascript support (from offset 216 to offset 516), bcs. the JS support does not translate Snapshot offsets from embedding-relative positions to absolute ones for comments. Petre, could you please review/correct the supplied fix ? It may be also worth to review other places with new OffsetRange().
Changeset: 8d8c4a12dfed Author: Svata Dedic <sdedic@netbeans.org> Date: 2012-09-17 16:58 Message: Issue #217809 - Wrong position of folding line: fixed Translated comment folds to global offsets
Integrated into 'main-golden', will be available in build *201209190001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/8d8c4a12dfed User: Svata Dedic <sdedic@netbeans.org> Log: Issue #217809 - Wrong position of folding line: fixed Translated comment folds to global offsets
seems to be fine, thanks Product Version: NetBeans IDE Dev (Build 201209190001) Java: 1.7.0_07; Java HotSpot(TM) Client VM 23.3-b01 System: Linux version 3.2.0-30-generic-pae running on i386; UTF-8; en_US (nb)
*** Bug 216573 has been marked as a duplicate of this bug. ***