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.

Bug 197586 - Bad repainting of code folding side bar
Summary: Bad repainting of code folding side bar
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 7.0
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-09 07:44 UTC by fransmarks
Modified: 2011-06-03 10:20 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
small sreengrep of codefolds repaint issue in action (805.38 KB, application/octet-stream)
2011-04-11 09:06 UTC, mklaehn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fransmarks 2011-04-09 07:44:04 UTC
Product Version = NetBeans IDE 7.0 RC2 (Build 201104070802)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_19
Runtime = Java HotSpot(TM) Client VM 16.2-b04

In version Beta 2 the codefolding worked fine. In RC 1 and RC 2 codefolding is not rewritten properly after using it. You need to scroll up or down to get the complete codefolding line and "+" and "-" signs again. Or you can go to another script tab and back again to force the ide to rewroite the codefolding.
Comment 1 Marian Mirilovic 2011-04-10 10:53:50 UTC
(In reply to comment #0)
> complete codefolding line and "+" and "-" signs again. Or you can go to another
> script tab and back again to force the ide to rewroite the codefolding.

What is the language used in the editor (java, php, js, ... ) ? Based on the comment, this is another recent regression ... please evaluate ASAP.
Comment 2 mklaehn 2011-04-10 15:30:52 UTC
(In reply to comment #1)
> What is the language used in the editor (java, php, js, ... ) ? Based on the
> comment, this is another recent regression ... please evaluate ASAP.

For me it happens in java.
Comment 3 Miloslav Metelka 2011-04-10 22:24:23 UTC
Could you please attach any screenshot? Or is the problem like in issue 196281?
Btw regarding bug's title: there was no rewrite of any code related to code folding recently. It has to be related to recent fixes in view hierarchy.
Comment 4 mklaehn 2011-04-11 07:10:15 UTC
(In reply to comment #3)
> Could you please attach any screenshot? Or is the problem like in issue 196281?

These issues (for me) seem like they are related.

> Btw regarding bug's title: there was no rewrite of any code related to code
> folding recently. It has to be related to recent fixes in view hierarchy.

I think the meaning is more like repaint than rewrite.

btw. in c++ files it happens as well.
Comment 5 Vladimir Riha 2011-04-11 07:56:46 UTC
I can confirm that it happens in php as well. My guess it is the same as in issue #196651
Comment 6 Miloslav Metelka 2011-04-11 08:05:25 UTC
mklaehn could you please confirm whether it's like in issue 196651? Or is it that the vertical line (delimiting the fold's boundaries) crosses the box with +/- sign? Or anything else? Anyway screenshot would be the best. Thanks.
Comment 7 mklaehn 2011-04-11 09:04:36 UTC
(In reply to comment #6)
> mklaehn could you please confirm whether it's like in issue 196651? Or is it
> that the vertical line (delimiting the fold's boundaries) crosses the box with
> +/- sign? Or anything else? Anyway screenshot would be the best. Thanks.

I think it's like issue 196651 although according to the issues title its concern is the code folding icons. for me it's about the codefolding lines, icons and through the icons (at least as a visual helper) the actions (expand/collapse). I'll attach a small screengrep of it in action shortly.
hope it will help.

i do have a few visual observations though.
It seems that if the editors position (position in the file edited) is not changed due to the codefold action the codefolds seem to be drawn based on some old data. Which results in bad or even no repaints of some regions.

These bad regions do not only apply to the codefolds but to versioning as well. The screencast will show that as well.
Comment 8 mklaehn 2011-04-11 09:06:30 UTC
Created attachment 107632 [details]
small sreengrep of codefolds repaint issue in action
Comment 9 Miloslav Metelka 2011-04-11 13:19:54 UTC
http://hg.netbeans.org/jet-main/rev/c9c4753eeba1
Comment 10 Vladimir Riha 2011-04-12 07:24:49 UTC
verified

Product Version: NetBeans IDE Dev (Build 201104120401)
Comment 11 Quality Engineering 2011-04-12 08:43:45 UTC
Integrated into 'main-golden', will be available in build *201104120401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/c9c4753eeba1
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #197586 - Bad repainting of code folding side bar.
Comment 12 fransmarks 2011-04-12 10:52:51 UTC
Using the nightly build 201104120401 some of my javascript files don't have code folding at all. I have to put a comment block (// is enough) at the start of the file to get code folding. 

And all my php files don't show code folding anymore. They still do in RC2
Comment 13 Vladimir Riha 2011-04-12 11:00:25 UTC
The missing folding in php/html is different issue #197061
Comment 14 fransmarks 2011-04-25 09:56:19 UTC
Although fixed in the dev versions the problem is back in the final release of Netbeans 7.0 (On windows 7)
Comment 15 Miloslav Metelka 2011-05-16 13:11:16 UTC
Integrated into release70_fixes:
c9c4753eeba1 transplanted as b3a321345977

For the list of included fixed bugs please check
http://wiki.netbeans.org/NetBeans70PatchesInfo