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.
Product Version: NetBeans IDE Dev (Build 101025-696dca0c280b) Java: 1.6.0_20; OpenJDK Client VM 17.0-b16 System: Linux version 2.6.35-22-generic-pae running on i386; UTF-8; en_US (nb) I don't see tooltips when hovering on variables in editor. I guess that is a regression (I am just not sure if it is regression of Kubuntu 10.10 or NetBeans).
I have NetBeans on tag "release69_base". I have breakpoint in core.startup ModuleList line 1600. I am attaching to NetBeans IDE started with -Xdebug.... I see no variable values.
Reproduced. getAttachedAnnotatable() returns null, therefore we do not have the appropriate Line.Part. It's not clear where is the problem yet...
This is caused by dismiss of the tooltip in parallel with it's setup. By debugger I've discovered there two threads: "Folder recognizer" org.netbeans.modules.editor.NbToolTip$Request.resolveTooltipText(NbToolTip.java:443) org.netbeans.modules.editor.NbToolTip$Request.run(NbToolTip.java:413) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1426) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968) This is going to attach the Line.Part to the annotatable and then asking the annotatable for a short description. In parallel with this runs: "AWT-EventQueue-0" org.openide.text.Annotation.detach(Annotation.java:135) org.netbeans.modules.editor.NbToolTip$Request.dismiss(NbToolTip.java:530) org.netbeans.modules.editor.NbToolTip$Request.propertyChange(NbToolTip.java:554) java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335) java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327) java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263) org.netbeans.editor.ext.ToolTipSupport.firePropertyChange(ToolTipSupport.java:922) org.netbeans.editor.ext.ToolTipSupport.setStatus(ToolTipSupport.java:592) org.netbeans.editor.ext.ToolTipSupport.setToolTipVisible(ToolTipSupport.java:562) org.netbeans.editor.ext.ToolTipSupport$Listener.mouseMoved(ToolTipSupport.java:1103) java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:330) java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:329) java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:329) java.awt.Component.processMouseMotionEvent(Component.java:6479) javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3339) java.awt.Component.processEvent(Component.java:6203) java.awt.Container.processEvent(Container.java:2203) java.awt.Component.dispatchEventImpl(Component.java:4790) java.awt.Container.dispatchEventImpl(Container.java:2261) java.awt.Component.dispatchEvent(Component.java:4616) java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4803) java.awt.LightweightDispatcher.processMouseEvent(Container.java:4476) java.awt.LightweightDispatcher.dispatchEvent(Container.java:4393) java.awt.Container.dispatchEventImpl(Container.java:2247) java.awt.Window.dispatchEventImpl(Window.java:2671) java.awt.Component.dispatchEvent(Component.java:4616) java.awt.EventQueue.dispatchEvent(EventQueue.java:662) org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137) java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:209) java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:118) java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) java.awt.EventDispatchThread.run(EventDispatchThread.java:90) which clears the Line.Part from Annotation. Therefore when getShortDescription() is called, it's null already.
I have seen this in cases but unfortunatelly not in simple test cases, so evaluation is likely to take a while. Workaround seems to be to select the variable (or use Watches).
Simple reproducible test case: -------------------------------------- package javaapplication2; public class JavaApplication2 { public static void main(String[] args) { new Impl().run(); } private static final class Impl implements Runnable { public void run() { int i = 5; System.err.println(i);//breakpoint here } } } -------------------------------------- place the breakpoint at commented line, debug and try to show value tooltip for "i" - will not work. Cause: debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipAnnotation.java:474 (isValidTooltipLocation): if (!superTypeNames.contains(className[0])) return false; className[0] is a binary name (i.e. with '$' to separate inner classes), but superTypeNames contains class names with '.'. So isValidTooltipLocation returns false. (I have added log messages to NbToolTip$Request to see the queries&dismisses and the order and timing of these seemed correct. Of couse, as soon as the mouse moves, the request is canceled/dismissed.)
Ah, I see. Thanks for the explanation, thus the code is not much debuggable... I thought that I've fixed already the problem with inner classes in issue #187208. Apparently that was not sufficient... :-( I'll look at it... It's a regression of NB 6.9.
Fixed in changeset: 180994:e4724334ec50 http://hg.netbeans.org/main/rev/e4724334ec50
Having unit test for this kind of fragile behavior could prevent future regressions.
Integrated into 'main-golden', will be available in build *201011030000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/e4724334ec50 User: mentlicher@netbeans.org Log: #191365 Compare binary class names.