Open stephan-herrmann opened 1 month ago
hello, i tried to write a comment on a method.
/**
* 通过反射创建新的实例。
* 如果想通过反射创建新的实例,在jdk9之后,使用{@link Constructor#newInstance(Object...) newInstance}来创建
*
* and redirect to {@link java.lang.Object}, and to {@link java.lang}
*/
public void createNewInstance() {
}
run command line :
H:\dev\java\jdk11\bin\javadoc.exe -encoding utf-8 -charset utf-8 -d .\bin\javadoc\ -cp .\src -link 'https://docs.oracle.com/en/java/javase/11/docs/api/' javadoc
this is project's layout:
open method's javadoc in browser:
link can redirect as expected whether it's class member or package reference, but eclipse java editor can't give a hyperlink on a package reference, class member reference works.
{@link package.class#member label}
eclipse java editor can't give a hyperlink on a package reference, class member reference works.
exactly, that's what this issue is about.
Found during #1472: within javadoc an explicit link to a package only works when
package-info.java
exists. Implicit links "work", though.The link
{@link java.util}
does not navigate anywhere.Navigating first to
java.util.List
shows the qualified name whose segmentutil
lets me navigate to the package (albeit signaling "Note: The Javadoc for this element could neither be found in the attached source nor the attached Javadoc.").In https://openjdk.org/jeps/467, however, I learned that such package links should work.