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.
I use html tooltips with some images given by URLs to images deep inside netbeans modules. These make the tooltip text very long although the rendered tooltip itself has only 7 short lines. The newly (NB 8.0.1) introduced MAX_TOOLTIP_LENGTH=1000 in org.netbeans.swing.outline.Outline cuts my tooltip in the middle of an image which leaves a broken image and breaks the tooltip. The comment for MAX_TOOLTIP_LENGTH is "Tooltips larger than this are screwed up.". I couldn't find the original ticket which was the reason for this change. Nevertheless my (html) tooltips worked flawlessly, being much larger than 1000 characters. Probably displaying regular (non html) tooltips with more than 1000 characters is an issue, but for html tooltips it doesn't seem to be a good idea to just cut it somewhere in the middle.
For the BeanTreeView the same tooltip does still work.
Found the original issue: https://netbeans.org/bugzilla/show_bug.cgi?id=243700#c10 I would think there is a better way to fix the original issue than make the NB Platform worse by limiting it to an arbitrary number of 1000, which is much too short in my opinion. It is also inconsistent with the BeanTreeView.
I don't know what version this was originally opened against, but I'm guessing it was 8.0.2. For what it's worth, I can reproduce the problem in: Product Version: NetBeans IDE Dev (Build 201506110001) Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14 System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb) User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev Please consider fixing this issue soon. It makes the debugger view less useful than it should be (cannot debug strings with over 1000 characters, which is very short indeed).
Thus we probably need to check if the tooltip is HTML, or plain text...
Fixed by changeset: 289347:3fbb0199153e http://hg.netbeans.org/core-main/rev/3fbb0199153e
Martin, I wasn't asking for the limit to be increased exclusively for HTML. I was asking for it to be increased for plain text as well. The original issue that added a limit set it at 100,000 characters. Why is the current limit down to 1,000 characters? Please consider increasing the limit to 100,000, across both HTML and plain text (why should they be treated differently?).
I'm sorry, but the limit of 1000 characters was added to fix a rendering problem of tooltips. If you set a tooltip text containg e.g. 1500 characters, it's not rendered correctly. The text is sometimes written several times over itself, or it's empty, although the tooltip boundary is wide accross the whole screen. I'd be happy if I would not be forced to add any such artificial constants into the code, but Swing has rendering problems. :-( They can be reproduced with the project at https://netbeans.org/bugzilla/attachment.cgi?id=148284 when the tooltip limit is off. The original limit was only to limit the memory consumption in debugger. And it stays at 100000. The other limit is for the tooltip rendering and this is 1000, longer strings can not be seen anyway due to width of most screens. Tooltip in the editor that shows values of variables under the mouse during debugging, is a multi-line tooltip and this tooltip uses the 100000 text length limit. Thus longer values can be seen in the editor. Resolving back as fixed, since for HTML tooltips, where a long text might have sense, it's fixed. And it's solely up to the HTML rendering to do it's best.
Integrated into 'main-silver', will be available in build *201507040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/3fbb0199153e User: mentlicher@netbeans.org Log: #249366: Do not cut HTML tooltips.
Martin, I just tried build 201507040001 and the Debugger editor for String is still limited to roughly 1,000 characters, not 100,000 characters as you had written. The specific message I am getting "The String value is too large. Displaying 1,003 characters out of 91,168 characters". I am therefore reopening this issue. If you believe this is a separate issue, I will happily open a new bug report but please try to fix this with high priority because it makes debugging JSON-structured strings very difficult.
And which JDK version are you using? You probably hit issue #250307 (yes, there are so many problems with showing values in debugger) :-( The JDK bug is fixed in 1.8.0 update 60, therefore you'll see 100 000 characters again when you use update 60 or newer, or JDK 7.
That did it (updating to JDK8 update 60). Thank you for the clarification and the fix!