在 javadocs 中包含图像 [英] Including images in javadocs

查看:27
本文介绍了在 javadocs 中包含图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我处理了许多可视化的示例测试用例.有什么方便的方法可以将它们包含在我的 Java 源代码中并将它们链接到 Javadocs 中,这样我的 IDE 就可以在编码时自动显示它们(通过在我的 IDE 中调用 javadoc 渲染器功能?)

I work with a lot of sample test cases that are visual. Is there any convenient way to include them in my Java source and link them in Javadocs, so my IDE can automatically show them while coding (by invoking a javadoc renderer feature in my IDE?)

我尝试在 Java 源代码旁边放置一个图像并使用 <img>,但它没有用(我使用了 png).

I tried putting an image next to the Java source and using <img>, but it's not taking (I used a png).

(注意 - 在这种情况下它在我的测试源中)

(note - it's in my test sources in this case)

推荐答案

由于你没有显示任何来源,我只能做一个玻璃球猜测......

As you didn't show any sources, I can only do a glass-ball guess ...

对于任何用于文档目的的文件,应将它们放在包目录的名为 doc-files 的子目录中.然后这些将被 Javadoc 简单地复制到输出目录.然后在 元素中使用相对路径.

For any files which are needed for documentation purposes, one should put them in a subdirectory named doc-files of your package directories. These will then be simply copied by Javadoc to the output directory. Then use a relative path in the <img> element.

我不确定您的 IDE 的 Javadoc 渲染器是否会做同样的事情,但值得一试.

I'm not sure if your IDE's Javadoc renderer will do the same, but it is worth a try.

这篇关于在 javadocs 中包含图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆