简体   繁体   English

如何快速创建Eclipse中元素的Javadoc链接?

[英]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 eg, {@link AllowAllHostnameVerifier} . 我想从我的Javadocs中轻松创建类,方法,字段等的链接,而不必输入完整的表达式,例如{@link AllowAllHostnameVerifier}

What is the fastest way to do this in Eclipse? 在Eclipse中执行此操作的最快方法是什么?

  1. If you don't already have a Javadoc for the element you're documenting, press 如果您还没有要记录的元素的Javadoc,请按
    Shift + Alt + J . 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 . 使用AllowAllHostnameVerifier示例,在您希望链接的Javadoc注释中,使用自动完成:键入AAHV然后按Ctrl + Space

  3. Select {@link AllowAllHostnameVerifier} from the list of autocomplete options by pressing then Enter . 然后按Enter,从自动填充选项列表中选择{@link AllowAllHostnameVerifier}

另外,您还可以使用{@link # Ctrl + Space为当前类中的方法创建方法,或者使用{@link ClassName# + Control Space for ClassName中的方法创建方法的链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Eclipse中启用Javadoc警告? - How can I enable Javadoc warnings in Eclipse? Java:如何在Eclipse中快速重新排序构造函数和方法参数? - Java: How can I reorder constructor and method arguments quickly in eclipse? Java:如何使用Javadoc创建外观漂亮的类文档? - Java: How can I create good looking class docs with Javadoc? 如何在搜索引用时(在Eclipse中)找到JavaDoc {@link}中的元素? - How to avoid that elements in JavaDoc {@link } are found when I search for references (in Eclipse)? 可以为整个Eclipse项目自动创建javadoc标记吗? - Can one automatically create javadoc tags for an entire Eclipse project? 如何在Eclipse中查看Javadoc? - How to view Javadoc in Eclipse? 在Eclipse中更改方法签名时,如何自动更新Javadoc? - How can I automatically update the Javadoc when changing the method signature in Eclipse? 如何构建我的jar文件,以便使用该库的用户能够在Eclipse中看到javadoc - How can I build my jar file so that users who use the library will be able to see the javadoc in Eclipse Eclipse中的代码清理-如何在非Javadoc注释中保留空白行? - Code cleanup in Eclipse - How can I preserve blank lines in non-javadoc comments? 如何使用 EGit 和 Eclipse 将 JavaDoc 从 master 分支移动到 GitHub 上的 gh-pages 分支? - How I can move JavaDoc from master branch to gh-pages branch on GitHub using EGit and Eclipse?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM