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 201512240002) Java: 1.8.0_66; Java HotSpot(TM) 64-Bit Server VM 25.66-b17 Runtime: Java(TM) SE Runtime Environment 1.8.0_66-b17 System: Windows 10 version 10.0 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 Given: public class SomeClass { /** * method 1. */ void method1(); /** * method 2. */ void method2(); } If a user places the caret on "method 2" (inside the Javadoc) then the viewer shows the Javadoc for method 1. Workaround: Place caret on method2() prototype, below the actual Javadoc. Justification: The current behavior makes it hard to edit Javadoc and see the results update live. I have to constantly shift the caret down to the method prototype to view my changes. Expected behavior: When the Javadoc for method2 is selected, it should get displayed as opposed to that of method 1.
In fact, the only way to get the Javadoc to display seems to be to select the method name. Selecting the return type, or method parameters shows their respective Javadoc instead.
I changed this issue to an enhancement request. It looks like the viewer shows the class Javadoc when the caret is on top of a method's Javadoc, so I assume this behavior is by design. I still strongly recommend changing the behavior to displaying the method's Javadoc so it can be previewed as it is being edited.
I tried to reproduce with the SomeClass code (and with a very similar hand-written), but javadoc window tracks properly when either the caret is inside the javadoc or at the very start of it. Please attach the exact file, maybe some subtle formatting issue confuses the analyzer ?
You are right, this is file-specific. Please open ObjectPreconditions.java (attached) and please the caret on any of the method Javadocs. Let me know if you can reproduce this on your end.
Created attachment 158113 [details] ObjectPreconditions.java
"please the caret on any of the method Javadocs" -> *place* the caret on any of the method Javadocs :)
Note that on e.g. class/type parameter return type, the javadoc window will display javadoc for the return type (type parameter) rather than for the method. Fixed in jet-main#07d159ae4cec
Integrated into 'main-silver', will be available in build *201604280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/07d159ae4cec User: Svata Dedic <sdedic@netbeans.org> Log: #257347: navigate to member if positioned in javadoc or at start of 1char ident