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

余生颓废 提交于 2019-12-09 09:51:31

问题


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?


回答1:


  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.




回答2:


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.



来源:https://stackoverflow.com/questions/9908624/how-can-i-quickly-create-javadoc-links-to-elements-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!