T
Twisted
This is unexpected behavior and a problem:
I have a sourcefile where one of the doc comments contains:
{@link ETF#getIteratorInstance(Options, Parameters)
ETF.getIteratorInstance}
It's impossible to "organize imports" in Eclipse when editing this file
now. It highlights Parameters in this doc comment and wants me to pick
either java.security.Policy.Parameters or
javax.security.auth.login.Configuration.Parameters, and does not
provide the option to skip doing so but still import whatever else
(e.g. HashSet) has been referenced and needs importing.
The code itself does not actually reference Options or Parameters,
which are actually type parameters to the class ETF. It is only this
one @link doc tag that references them as part of the signature of the
linked-to method. Neither of the Parameters classes suggested as
imports are at all useful or relevant here.
This is a significant wart, though not a showstopper. Organize imports
should, it seems to me, limit itself to what's actually used by the
Java code, and if javadoc needs this to find them, types actually
linked to in comments (in this case ETF but not Options or Parameters).
This looks likely to be a result of the relatively recent introduction
of generics. Let's hope this sort of thing is smoothed out in the next
version of Eclipse (and, if partially responsible, javac and/or
javadoc)...
I have a sourcefile where one of the doc comments contains:
{@link ETF#getIteratorInstance(Options, Parameters)
ETF.getIteratorInstance}
It's impossible to "organize imports" in Eclipse when editing this file
now. It highlights Parameters in this doc comment and wants me to pick
either java.security.Policy.Parameters or
javax.security.auth.login.Configuration.Parameters, and does not
provide the option to skip doing so but still import whatever else
(e.g. HashSet) has been referenced and needs importing.
The code itself does not actually reference Options or Parameters,
which are actually type parameters to the class ETF. It is only this
one @link doc tag that references them as part of the signature of the
linked-to method. Neither of the Parameters classes suggested as
imports are at all useful or relevant here.
This is a significant wart, though not a showstopper. Organize imports
should, it seems to me, limit itself to what's actually used by the
Java code, and if javadoc needs this to find them, types actually
linked to in comments (in this case ETF but not Options or Parameters).
This looks likely to be a result of the relatively recent introduction
of generics. Let's hope this sort of thing is smoothed out in the next
version of Eclipse (and, if partially responsible, javac and/or
javadoc)...