Bug 546796 - [javadoc] Completion incorrectly suggests reference to enclosing class constructor within nested class
Summary: [javadoc] Completion incorrectly suggests reference to enclosing class constr...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.12   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-28 08:50 EDT by Some User CLA
Modified: 2023-04-16 13:42 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Some User CLA 2019-04-28 08:50:16 EDT
Java javadoc link completion incorrectly suggests for a nested class a refernce to the constructor of the enclosing class.

This reference is then also incorrect resolved when viewing the javadoc.

To reproduce:
1. Create a class called "JavaDocLinkTests" and paste the following
-----
public class JavaDocLinkTests {
    /**
     * test
     */
    public JavaDocLinkTests() { }
    
    /**
     * Nested class doc
     */
    public static class Nested {
        /**
         * The following is suggested when typing '#'; also shows hover for constructor. However when using the Javadoc view 
         * the link cannot be resolved (or is incorrectly resolved?) as expected
         * 
         * {@link #JavaDocLinkTests()}
         */
        public void nestedMethod() { }
    }
}
-----
2. Within the doc comment for `nestedMethod`, type `#`
-> It incorrectly suggests `#JavaDocLinkTests()`
3. In the code, hover over the link
-> It incorrectly (?) shows the doc for the constructor ("test"); should not have been able to resolve the reference
4. Open the javadoc view and click on the link
-> It incorrectly shows the doc of the nested class ("Nested class doc")
Comment 1 Eclipse Genie CLA 2021-04-18 00:20:29 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Eclipse Genie CLA 2021-04-18 17:17:59 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Eclipse Genie CLA 2023-04-15 03:08:16 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Eclipse Genie CLA 2023-04-16 13:42:57 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.