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 178284

Summary: Fold preview takes too much space
Product: editor Reporter: Jiri Prox <jiriprox>
Component: Code foldingAssignee: mslama <mslama>
Status: RESOLVED FIXED    
Severity: normal CC: apireviews, jglick
Priority: P3 Keywords: API, API_REVIEW_FAST
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: screen shot
Patch
Patch with added constructor parameter

Description Jiri Prox 2009-12-08 03:41:38 UTC
Product Version: NetBeans IDE 6.8 (Build 200912041610)
Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01
System: Linux version 2.6.31-16-generic running on i386; UTF-8; en_US (nb)

Fold preview (popup which is shown when hovering mouse over collapsed fold) takes too much space if the folded code is quite short.  See the screenshot
Comment 1 Jiri Prox 2009-12-08 03:42:27 UTC
Created attachment 92254 [details]
screen shot
Comment 2 Vitezslav Stejskal 2009-12-10 04:13:14 UTC
Looks ugly. My guess is that the bottom part is the padding that we added some time ago to make editing at a position close to the end of a document slightly more convenient.
Comment 3 mslama 2009-12-10 07:40:56 UTC
It is regression because bottom padding was added to editor view. It should be disabled for tooltip view.
Comment 4 mslama 2009-12-14 11:55:16 UTC
Created attachment 92555 [details]
Patch
Comment 5 Vitezslav Stejskal 2009-12-15 01:00:14 UTC
Marku, wouldn't it be possible to pass the boolean flag simply to the constructor of GapDocumentView? Having protected non-final field that's supposed to be modified by subclasses does not sound like a good API design to me.
Comment 6 mslama 2009-12-15 05:41:13 UTC
Created attachment 92601 [details]
Patch with added constructor parameter
Comment 7 mslama 2009-12-22 06:45:05 UTC
jet-main #27febef72bc3

Field is made final to be able to set it just once in constructor.
Comment 8 Quality Engineering 2009-12-22 23:43:43 UTC
Integrated into 'main-golden', will be available in build *200912230201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/27febef72bc3
User: Marek Slama <mslama@netbeans.org>
Log: #178284: Fold preview takes too much space.