Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I quickly create Javadoc links to elements in Eclipse?

I want to easily create links to classes, methods, fields, etc. from within my Javadocs without having to type out the full expression e.g., {@link AllowAllHostnameVerifier}.

What is the fastest way to do this in Eclipse?

like image 443
Jeff Axelrod Avatar asked Mar 28 '12 13:03

Jeff Axelrod


2 Answers

  1. If you don't already have a Javadoc for the element you're documenting, press
    Shift+Alt+J.

  2. Using the AllowAllHostnameVerifier example, from within the Javadoc comment where you'd like the link, use autocomplete: Type AAHV then Ctrl+Space.

  3. Select {@link AllowAllHostnameVerifier} from the list of autocomplete options by pressing then Enter.

like image 58
Jeff Axelrod Avatar answered Oct 12 '22 23:10

Jeff Axelrod


As an addition, you can also create links to methods by using {@link # Ctrl+Space for methods in the current class, or by using {@link ClassName# + Control Space for methods in ClassName.

like image 37
zedoo Avatar answered Oct 12 '22 23:10

zedoo