Community
Participate
Working Groups
I20040310 Search for references to class AA. In "new AA()", "AA" is found. In "@see AA#AA()", only the class reference (first "AA") is found, but not the constructor (second "AA"). Either both constructors should be found or none of them. /** * @see AA#AA() */ public class AA{ AA( ){ new AA(); }; }
jdt-ui reminder: Disabled failing (new) test RenameTypeTests#test50().
The second "AA" in @see AA#AA() is not an instance of class AA, it's a constructor reference. So it's normal that it is not found while searching to class reference. In fact this search does not found the "AA" of AA() {..} for the same reason and it does not hurt you... If I write this example in different manner, I'm sure it will be more obvious: /** * @see AA#AA(String) */ public class AA{ AA(String str){ new AA("test"); }; } Isn't it?
Reopen after having talked about this with Philippe: the constructor reference should include Type binding instead of constructor binding. So, it should match the type reference...
Olivier, Philippe told me that you were investigating a similar problem. Perhaps it is a duplicate ?
*** Bug 63044 has been marked as a duplicate of this bug. ***
The other PR is bug 62605.
*** Bug 62650 has been marked as a duplicate of this bug. ***
Forget all duplicate and reopening of this bug. I have mixed DOM and Compiler AST nodes bindings... So, resolved as invalid again as comment 2 arguments were definetely correct.
This bug causes bug 148804. From comment 2: > In fact this search does not found the "AA" of AA() {..} for > the same reason and it does not hurt you... It does hurt us, but not as much as the missing constructor references in javadoc. We already rename constructors manually, but doing a second search just to find constructor references in javadocs would be too much.
(In reply to comment #9) > This bug causes bug 148804. > > It does hurt us, but not as much as the missing constructor references in > javadoc. We already rename constructors manually, but doing a second search > just to find constructor references in javadocs would be too much. > I'm really interesting to know how do you rename constructor references in code?
> I'm really interesting to know how do you rename constructor references in > code? Super-easy: we get them from the search engine. Every search for references to a class also reports the names in constructor invocations. Just the names in constructor declarations and those in javadoc references to constructors are missing. The former are cheap to update manually; the latter would require another search.
(In reply to comment #2) > /** > * @see AA#AA(String) > */ > public class AA{ > AA(String str){ > new AA("test"); > }; > } So why does a search for references to type AA find the reference to the constructor in 'new AA("test")', but not the reference to the same constructor in '#AA(String)'? Together with comment 9, I think this should be enough justification to reopen and finally fix this bug.