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.
Summary: | code fold popup (tooltip) is empty | ||
---|---|---|---|
Product: | editor | Reporter: | mco <mco> |
Component: | Code folding | Assignee: | Miloslav Metelka <mmetelka> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | hmichel |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Other | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
editor with fold tooltip shown
folded code expanded IDE log file |
Created attachment 101847 [details]
folded code expanded
Created attachment 101848 [details]
IDE log file
Hi. I've done some debugging and it looks like it's a view issue. If I try to create fold with no blank characters in front of code and then pop-up gets only first chars of each line. So it looks that text is retrieved properly from editor. I've attached debugger to running Netbeans and found out that somehow preferred size for pop-up is calculated wrong: PopupManager.computeBounds( JComponent popup, int viewWidth, int viewHeight, Rectangle cursorBounds, Placement originalPlacement, HorizontalBounds horizontalBounds) { ... 381: Dimension prefSize = popup.getPreferredSize(); 382: final int width = Math.min(viewWidth, prefSize.width); 384: popup.setSize(width, Integer.MAX_VALUE); ... popup.setSize(width, Integer.MAX_VALUE); And this gives very small value for: FoldingToolTip.setSize(int width, int height){ ... 111: width = Math.min(width, viewWidth); ... Thus pop-up width is too small to render text. I've compared it with 6.8 code and there pop-up width is simply set from viewWidth: 377: popup.setSize(viewWidth, height); Sorry no time now to do some more investigation now. Hope this helps a little bit. Bye. Marek *** This bug has been marked as a duplicate of bug 189233 *** |
Created attachment 101846 [details] editor with fold tooltip shown Hi. After upgrading to 6.9.1 popups that should contain folded code are empty. It just contain line numbers, but no code (check screenshots).