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 106699 [details] Screenshot attached... Product Version: NetBeans IDE Dev (Build 201103040000) Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb) Steps to reproduce: -Create new j2se project -create new JFrame form -switch the created frame from Design mode to the Source mode -expand the fold with Generated Code -go to the line with the initComponents method and collapse the fold by this line -->> the line between two folds is painted over the one which is below the first one - see attached screenshot
Created attachment 106967 [details] same problem in php file The same happens on php web page if I click on the folding mark several times, resizing netbeans window or reopening the file fixes it. Product Version: NetBeans IDE Dev (Build 201103130400) Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
It is happening quite random and only if I use the folding mark, keyboard shortcut and command View|Cold Folds|... works always fine. I gues it should be more like a P3
(In reply to comment #2) > It is happening quite random and only if I use the folding mark, keyboard > shortcut and command View|Cold Folds|... works always fine. I gues it should be > more like a P3 "quite random" i cannot support. everytime the codefold is expanded or collapsed and the editor is not forced to reset the carets position this happens to me. completely unrelated on what ui action (mouseclick, keyboard or (context) menu entry) caused the codefold to expand/collaps as you pointed out this happens in java files. PHP i have to take your word for it. C++ files have this phenomenon as well.
Weird, I have just tried it in java file and it's not happening always and using context menu was fine, keyboard gave me 2 errors from 10 attempts and mouseclick was the worst. I have already asked in issue #196651 if it is a duplicate of this. Product Version: NetBeans IDE Dev (Build 201104030400) System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
(In reply to comment #4) > mouseclick was the worst. I have already asked in issue #196651 if it is a > duplicate of this. Going by the screenshot alone. They do seem to have a connection. i.e. not always being repainted properly after expanding/collapsing them. issue #197586 seems to have the same connection.
*** Bug 197415 has been marked as a duplicate of this bug. ***
*** Bug 196651 has been marked as a duplicate of this bug. ***
fix-in-nb701 - marked during Acceptance Survey as a stopper, too late for NB 7.0 so we need to deliver fix into NB 7.0.1
Not seen in: Product Version: NetBeans IDE 7.0 (Build 201104211303) Java: 1.6.0_25; Java HotSpot(TM) 64-Bit Server VM 20.0-b11 System: versión Linux 2.6.38.5 ejecutándose en amd64; UTF-8; es_AR (nb)
I'm working on a new implementation of the code folding side bar which should resolve this problem.
BTW the problem can also be reproduced with the following class: public class FoldMarkProblem { void m() { new Runnable() { public void run() { } }; } } I've made a fix for existing CodeFoldingSideBar implementation: http://hg.netbeans.org/jet-main/rev/923f48d56e62 Unfortunately one more fix is needed that I'm working on right now.
It should now be fixed completely: http://hg.netbeans.org/jet-main/rev/195e058f48e6
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/923f48d56e62 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #196281 - Code folding line painted over the folding node - two nested folds ending at single line.
Integrated into 'main-golden', will be available in build *201107090600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/195e058f48e6 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #196281 - Code folding line painted over the folding node - additional fix.
verified Product Version: NetBeans IDE 7.1 Beta (Build 201109222201) Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17 System: Linux version 2.6.38-11-generic running on i386; UTF-8; en_US (nb)
Might I just add that I find this fix a bit counter-intuitive and perhaps wrong? The code folding painter code was quite straight forward, while with the current fix it seems to go back and revert a pixel it drew itself. I'm taking about the code marked with the comment: >> //Need to explicitly clear the previously drawn line under the mark in the changeset http://hg.netbeans.org/main-golden/rev/195e058f48e6 Perhaps the code should actually 'look ahead' via some "nextInfo PaintInfo" in order to prevent that bad line being drawn? I'm writing this here because the new code breaks my alternative code folding UI (posted here: http://netbeans.org/bugzilla/show_bug.cgi?id=145920 ). I'll look some more later on -- perhaps there is some other way to fix this without going back.