I want to easily create links to classes, methods, fields, etc. from within my Javadocs without having to type out the full expression eg, {@link AllowAllHostnameVerifier}
.
What is the fastest way to do this in Eclipse?
If you don't already have a Javadoc for the element you're documenting, press
Shift + Alt + J .
Using the AllowAllHostnameVerifier
example, from within the Javadoc comment where you'd like the link, use autocomplete: Type AAHV
then Ctrl + Space .
Select {@link AllowAllHostnameVerifier}
from the list of autocomplete options by pressing ↓ then Enter .
另外,您还可以使用{@link #
Ctrl + Space为当前类中的方法创建方法,或者使用{@link ClassName#
+ Control Space for ClassName中的方法创建方法的链接。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.